inhabitedtype / faraday

Serialization library built for speed and memory efficiency
Other
134 stars 20 forks source link

The uint48 functions are both broken #79

Open talex5 opened 1 year ago

talex5 commented 1 year ago

(reported against Eio in https://github.com/ocaml-multicore/eio/pull/418, which contains fixes and tests)

https://github.com/inhabitedtype/faraday/blob/c66fc020fdc2327556c36fc1e912524b427d7da8/lib/faraday.ml#L290-L297

@adatario noticed that the shifts should be in bits, not bytes.

Also, the BE version gets the sizes of the chunks wrong (should be 16 then 32).