vigna / dsi-bitstream-rs

A Rust implementation of read/write bit streams supporting several types of instantaneous codes
Apache License 2.0
7 stars 3 forks source link

Storing the total number of gaps inserted in CodesStats #12

Open LucaCappelletti94 opened 3 weeks ago

LucaCappelletti94 commented 3 weeks ago

Hi! Right now CodeStats does not store the number of gaps it has seen. It would be nice if it could store that as metadata so that I would not need to store it externally to compute the percentage of improvement over the naive baseline (storing the hashes themselves). Would it be okay if I added that as a u64?

https://github.com/vigna/dsi-bitstream-rs/blob/740abcd2dc81e08da987b38d766d3d723e0fa313/src/utils/stats.rs#L32-L55