fix(hll): update silently dropped after deserializing a compact List sketch (#117) When an `HllSketch` in **List mode** is serialized it uses compact format: only the live coupons are written to disk, with no trailing `COUPON_EMPTY` sentinels. On deserialization, the container was allocated with exactly `coupon_count` slots, leaving the array fully packed. `list::update()` scans linearly for a `COUPON_EMPTY` (`0`) sentinel to find an insertion slot. Finding none, it fell through silently — discarding every value added after the round-trip. Always allocate `1 << lg_arr` slots (initialized to `COUPON_EMPTY`) in `List::deserialize()`, reading only `coupon_count` elements from the byte stream in compact mode. The trailing empty slots are then available as sentinels for subsequent `update()` calls. Fixes #115.
This is the core Rust component of the DataSketches library. It contains a subset of the sketching algorithms and can be accessed directly from user applications.
Note that we have parallel core library components for Java, C++, Python, and Go implementations of many of the same sketch algorithms:
Please visit the main DataSketches website for more information.
If you are interested in making contributions to this site, please see our Community page for how to contact us.