Trait EncodingCompressor
Source pub trait EncodingCompressor:
Sync
+ Send
+ Debug {
// Required methods
fn id(&self) -> &str;
fn cost(&self) -> u8;
fn can_compress(&self, array: &Array) -> Option<&dyn EncodingCompressor>;
fn compress<'a>(
&'a self,
array: &Array,
like: Option<CompressionTree<'a>>,
ctx: SamplingCompressor<'a>,
) -> VortexResult<CompressedArray<'a>>;
fn used_encodings(&self) -> HashSet<EncodingId>;
}
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.