feat: builtin encoding

Co-authored-by: rvcas <x@rvcas.dev>
This commit is contained in:
Kasey White
2022-05-28 00:23:20 -04:00
parent c01469ea51
commit 41487733f7
6 changed files with 247 additions and 231 deletions

View File

@@ -1,13 +1,13 @@
pub enum Filler {
FillerStart(Box<Filler>),
// FillerStart(Box<Filler>),
FillerEnd,
}
impl Filler {
pub fn len(&self) -> usize {
match self {
Filler::FillerStart(f) => f.len() + 1,
Filler::FillerEnd => 1,
}
}
}
// impl Filler {
// pub fn len(&self) -> usize {
// match self {
// Filler::FillerStart(f) => f.len() + 1,
// Filler::FillerEnd => 1,
// }
// }
// }

View File

@@ -1,7 +1,7 @@
mod encode;
mod encoder;
mod filler;
mod zigzag;
pub mod zigzag;
pub mod en {
pub use super::encode::*;