pub enum MaskMethod {
Rle,
Roaring,
Blosc2 {
codec: Blosc2Codec,
level: i32,
},
Zstd {
level: Option<i32>,
},
Lz4,
None,
}Expand description
Bitmask compression method selector. Serialised in the CBOR
descriptor’s masks[kind].method field; see plans/WIRE_FORMAT.md
§6.5.1 for the schema.
Variants§
Rle
Bit-level run-length encoding. See rle for on-wire layout.
Best on highly-clustered masks (land / sea, swath gaps). Worst
on random alternating bits — the small-mask fallback at the
encoder-integration layer redirects to MaskMethod::None in
that case.
Roaring
Roaring Bitmap, serialised via the standard Roaring Portable Serialization Format.
Default mask method on every platform (including wasm32).
Hybrid containers (array / bitmap / RLE) adapt to mask density
automatically.
Blosc2
Blosc2 with BLOSC_BITSHUFFLE filter and a sub-codec (default
LZ4). Feature-gated on blosc2.
Fields
codec: Blosc2CodecInner codec after the bit-shuffle.
Zstd
Zstandard on the bit-packed bytes.
Lz4
LZ4 on the bit-packed bytes.
None
Uncompressed raw packed bytes — chosen automatically for tiny masks where compression overhead exceeds the savings.
Implementations§
Source§impl MaskMethod
impl MaskMethod
Sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
Canonical string name used in the CBOR masks[kind].method
field. Stable across the wire; do not change without a format
version bump.
Sourcepub fn from_name(name: &str) -> Result<MaskMethod, MaskError>
pub fn from_name(name: &str) -> Result<MaskMethod, MaskError>
Inverse of [name]. Does not parse the params sub-map —
method-specific parameters are handled by the encoder /
decoder integration layer. Returns MaskError::UnknownMethod
if the name is not one of the known values. Returns a
sub-codec feature-disabled error for blosc2 if the feature is
off at build time.
Trait Implementations§
Source§impl Clone for MaskMethod
impl Clone for MaskMethod
Source§fn clone(&self) -> MaskMethod
fn clone(&self) -> MaskMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MaskMethod
impl Debug for MaskMethod
Source§impl Default for MaskMethod
impl Default for MaskMethod
Source§fn default() -> MaskMethod
fn default() -> MaskMethod
impl Eq for MaskMethod
Source§impl PartialEq for MaskMethod
impl PartialEq for MaskMethod
impl StructuralPartialEq for MaskMethod
Auto Trait Implementations§
impl Freeze for MaskMethod
impl RefUnwindSafe for MaskMethod
impl Send for MaskMethod
impl Sync for MaskMethod
impl Unpin for MaskMethod
impl UnsafeUnpin for MaskMethod
impl UnwindSafe for MaskMethod
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more