rlz 0.2.0

Relative Lempel-Ziv (RLZ): a LZ based compressor against a large static dictionary
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use bytes::Bytes;

#[derive(Clone, PartialEq, Eq, Debug)]

pub(crate) enum FactorType {
    Literal(Bytes),
    Copy { offset: u32, len: u32 },
}

impl FactorType {
    pub(crate) fn len(&self) -> usize {
        match &self {
            FactorType::Literal(lit) => lit.len(),
            FactorType::Copy { offset: _, len } => *len as usize,
        }
    }
}