pub trait FixedPerValueDecompressor:
Debug
+ Send
+ Sync {
// Required methods
fn decompress(
&self,
data: FixedWidthDataBlock,
num_values: u64,
) -> Result<DataBlock>;
fn bits_per_value(&self) -> u64;
// Provided method
fn decoded_size_bytes(&self, _num_values: u64) -> Option<u64> { ... }
}Required Methods§
Sourcefn decompress(
&self,
data: FixedWidthDataBlock,
num_values: u64,
) -> Result<DataBlock>
fn decompress( &self, data: FixedWidthDataBlock, num_values: u64, ) -> Result<DataBlock>
Decompress one or more values
Sourcefn bits_per_value(&self) -> u64
fn bits_per_value(&self) -> u64
The number of bits in each value
Currently (and probably long term) this must be a multiple of 8
Provided Methods§
Sourcefn decoded_size_bytes(&self, _num_values: u64) -> Option<u64>
fn decoded_size_bytes(&self, _num_values: u64) -> Option<u64>
Returns the exact aggregate decoded size when it is determined solely by the value count.
Implementations should only return Some when this aggregate estimate can be used by
DataBlockBuilder to preallocate the decoded output
exactly. Outputs with multiple buffers or whose layout-dependent allocation cannot be
represented by one aggregate estimate should return None.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".