Struct redux::codec::Codec
[−]
[src]
pub struct Codec { /* fields omitted */ }
The current state of the encoder and decoder.
Methods
impl Codec
[src]
fn new(m: Box<Model>) -> Codec
Creates and initializes the codec for encoding or decoding.
fn compress_symbol(&mut self,
symbol: usize,
output: &mut BitWrite)
-> Result<()>
symbol: usize,
output: &mut BitWrite)
-> Result<()>
Compresses a symbol and outputs some bits depending on the state of the codec.
fn compress_stream(&mut self,
input: &mut BitRead,
output: &mut BitWrite)
-> Result<()>
input: &mut BitRead,
output: &mut BitWrite)
-> Result<()>
Compresses an entire byte stream outputting the EOF symbol and all bits for unambigous encoding.
fn decompress_symbol(&mut self, input: &mut BitRead) -> Result<usize>
Decompresses a symbol reading some bits until the symbol can be decoded.
fn decompress_stream(&mut self,
input: &mut BitRead,
output: &mut BitWrite)
-> Result<()>
input: &mut BitRead,
output: &mut BitWrite)
-> Result<()>
Decompresses a whole bit stream until the EOF symbol is found.