pub trait EncodingCompressor:
    Sync
    + Send
    + Debug {
    // Required methods
    fn id(&self) -> &str;
    fn cost(&self) -> u8;
    fn can_compress(&self, array: &ArrayData) -> Option<&dyn EncodingCompressor>;
    fn compress<'a>(
        &'a self,
        array: &ArrayData,
        like: Option<CompressionTree<'a>>,
        ctx: SamplingCompressor<'a>,
    ) -> VortexResult<CompressedArray<'a>>;
    fn used_encodings(&self) -> HashSet<EncodingRef>;
}

Required Methods§

source

fn id(&self) -> &str

source

fn cost(&self) -> u8

source

fn can_compress(&self, array: &ArrayData) -> Option<&dyn EncodingCompressor>

source

fn compress<'a>( &'a self, array: &ArrayData, like: Option<CompressionTree<'a>>, ctx: SamplingCompressor<'a>, ) -> VortexResult<CompressedArray<'a>>

source

fn used_encodings(&self) -> HashSet<EncodingRef>

Trait Implementations§

source§

impl<'a, 'b: 'a> Arbitrary<'a> for &'b dyn EncodingCompressor

source§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
§

fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
source§

impl Hash for dyn EncodingCompressor + '_

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
source§

impl PartialEq for dyn EncodingCompressor + '_

source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for dyn EncodingCompressor + '_

Implementors§