Skip to main content

MiniBlockDecompressor

Trait MiniBlockDecompressor 

Source
pub trait MiniBlockDecompressor:
    Debug
    + Send
    + Sync {
    // Required method
    fn decompress(
        &self,
        data: Vec<LanceBuffer>,
        num_values: u64,
    ) -> Result<DataBlock>;

    // Provided methods
    fn num_buffers(&self) -> usize { ... }
    fn decoded_size_bytes(&self, _num_values: u64) -> Option<u64> { ... }
}

Required Methods§

Source

fn decompress( &self, data: Vec<LanceBuffer>, num_values: u64, ) -> Result<DataBlock>

Provided Methods§

Source

fn num_buffers(&self) -> usize

Number of payload buffers consumed by each independently decoded chunk. Decoders with multiple buffers must override the single-buffer default.

Source

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".

Implementors§