use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CodecParams {
pub use_bwt: bool,
pub use_mtf: bool,
pub use_rle: bool,
pub range_coder_order: usize,
}
impl Default for CodecParams {
fn default() -> Self {
Self {
use_bwt: true,
use_mtf: true,
use_rle: true,
range_coder_order: 1,
}
}
}
pub struct SovereignCodec {
params: CodecParams,
}
impl SovereignCodec {
pub fn new(params: CodecParams) -> Self {
Self { params }
}
pub fn compress(&self, data: &[u8]) -> crate::Result<Vec<u8>> {
Ok(data.to_vec())
}
pub fn decompress(&self, data: &[u8]) -> crate::Result<Vec<u8>> {
Ok(data.to_vec())
}
}