Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Aug 24, 2023
1 parent 637e0d4 commit 32b6f65
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions roaring.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 1 addition & 4 deletions roaringarray.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 32b6f65

Please sign in to comment.