polars_parquet::parquet::encoding::hybrid_rle

Trait Encoder

Source
pub trait Encoder<T: PartialEq + Default + Copy> {
    // Required methods
    fn bitpacked_encode<W: Write, I: Iterator<Item = T>>(
        writer: &mut W,
        iterator: I,
        num_bits: usize,
    ) -> Result<()>;
    fn run_length_encode<W: Write>(
        writer: &mut W,
        run_length: usize,
        value: T,
        bit_width: u32,
    ) -> Result<()>;
}

Required Methods§

Source

fn bitpacked_encode<W: Write, I: Iterator<Item = T>>( writer: &mut W, iterator: I, num_bits: usize, ) -> Result<()>

Source

fn run_length_encode<W: Write>( writer: &mut W, run_length: usize, value: T, bit_width: u32, ) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Encoder<bool> for bool

Source§

fn bitpacked_encode<W: Write, I: Iterator<Item = bool>>( writer: &mut W, iterator: I, _num_bits: usize, ) -> Result<()>

Source§

fn run_length_encode<W: Write>( writer: &mut W, run_length: usize, value: bool, _bit_width: u32, ) -> Result<()>

Source§

impl Encoder<u32> for u32

Source§

fn bitpacked_encode<W: Write, I: Iterator<Item = u32>>( writer: &mut W, iterator: I, num_bits: usize, ) -> Result<()>

Source§

fn run_length_encode<W: Write>( writer: &mut W, run_length: usize, value: u32, bit_width: u32, ) -> Result<()>

Implementors§