From 32b6f658d2d3b8c95215f21ab18bc7adcaa08d10 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Thu, 24 Aug 2023 12:04:52 -0400 Subject: [PATCH] Some fixes --- roaring.go | 2 -- roaringarray.go | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/roaring.go b/roaring.go index 46a74a88..cdf543ce 100644 --- a/roaring.go +++ b/roaring.go @@ -135,8 +135,6 @@ func (rb *Bitmap) ReadFrom(reader io.Reader, cookieHeader ...byte) (p int64, err stream = byteInputAdapter } - // We pass false to readFrom to indicate that we don't want to resulting containers to be copy-on-write. - // They are regular, mutable containers. p, err = rb.highlowcontainer.readFrom(stream, cookieHeader...) if !ok { diff --git a/roaringarray.go b/roaringarray.go index c325630f..079195dd 100644 --- a/roaringarray.go +++ b/roaringarray.go @@ -551,10 +551,7 @@ func (ra *roaringArray) toBytes() ([]byte, error) { return buf.Bytes(), err } -// Reads a serialized roaringArray from a byte slice. If we are pointing at a raw buffer that must be immutable, then -// the parameter willNeedCopyOnWrite should be set to true (e.g., if the buffer is mmapped). Otherwise, if reading from -// a file or from the network into a temporary buffer, then set willNeedCopyOnWrite should be set to false because the -// resulting buffers are owned by the newly created roaringArray. +// Reads a serialized roaringArray from a byte slice. func (ra *roaringArray) readFrom(stream internal.ByteInput, cookieHeader ...byte) (int64, error) { var cookie uint32 var err error