Trait fibonacci_codec::EncodeOne [] [src]

pub trait EncodeOne where
    Self: Sized + Debug + Send + Sync
{ fn fib_encode_mut(self, vec: &mut BitVec) -> Result<(), EncodeError<Self>>; fn fib_encode(self) -> Result<BitVec, EncodeError<Self>> { ... } }

Allows encoding single primitive integers (> 0) using fibonacci coding.

Required Methods

Fibonacci-encodes an integer onto the end of an existing bit vector. It extends the bit vector by the numer of bits required to hold the output.

Errors

Returns an error when attempting to encode 0.

Provided Methods

Fibonacci-encodes an integer into a bit vector and returns the resulting vector.

Errors

Returns an error when attempting to encode 0.

Implementations on Foreign Types

impl EncodeOne for u8
[src]

[src]

[src]

impl EncodeOne for u16
[src]

impl EncodeOne for u32
[src]

impl EncodeOne for u64
[src]

Implementors