bits-and-blooms / bitset

Go package implementing bitsets
BSD 3-Clause "New" or "Revised" License
1.34k stars 175 forks source link

Binary encoding is not proper big-endian byte array even if `binaryOrder = BigEndian` #133

Closed omerfirmak closed 1 year ago

omerfirmak commented 1 year ago

https://github.com/bits-and-blooms/bitset/blob/7e78d86f98bc571f7712a86620fe0ba2c79dedc6/bitset.go#L933-L939

WriteTo first writes the least significant word, so even if the individual words are in big-endian format entire bitset is not properly encoded as a big-endian byte array.

lemire commented 1 year ago

If you have trouble serializing and deserializing a bitset, please provide a complete reproducible test case.

As written, this issue fails to identify a reproducible bug.

Closing.