pub struct EntropyMapBitpackedLookup { /* private fields */ }Expand description
Wrapper around entropy-map’s MapWithDictBitpacked for u32 -> u8 lookups This version uses bitpacking for even more compact storage Note: For now, we’ll use a simpler approach and just use MapWithDict with a different name TODO: Implement proper MapWithDictBitpacked support when API is clearer
Implementations§
Source§impl EntropyMapBitpackedLookup
impl EntropyMapBitpackedLookup
Sourcepub fn new(entries: &[(u32, u8)]) -> (Self, u64)
pub fn new(entries: &[(u32, u8)]) -> (Self, u64)
Create a new bitpacked entropy map from key-value pairs Returns the map and construction time in nanoseconds
Sourcepub fn lookup_batch(&self, keys: &[u32], results: &mut [u8])
pub fn lookup_batch(&self, keys: &[u32], results: &mut [u8])
Lookup multiple values at once
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get memory usage information