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