tinyjuice 0.2.0

Pluggable token compression for OpenHuman.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use thiserror::Error;

pub type TinyJuiceResult<T> = Result<T, TinyJuiceError>;

#[derive(Debug, Error, PartialEq, Eq)]
pub enum TinyJuiceError {
    #[error("compression input was empty")]
    EmptyInput,
    #[error("target ratio must be greater than 0 and at most 1")]
    InvalidTargetRatio,
    #[error("compression strategy is not implemented: {0}")]
    NotImplemented(&'static str),
}