hfmn 0.1.0

A flexible Huffman coding implementation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

#[derive(Error, Debug)]
pub enum Error {
    #[error("Symbol is not part of existing mapping")]
    SymbolNotFound,
    #[error("Code already in use")]
    CodeInUse,
    #[error("Code is not valid for this decoding table")]
    InvalidCode,
    #[error("No data was provided to build the codebook")]
    DataEmpty,
    #[error("The binary encoding appears to be malformed")]
    BinaryCoding(#[from] bincode::Error),
}