Trait succinct::stream::BitWrite [] [src]

pub trait BitWrite {
    fn write_bit(&mut self, value: bool) -> Result<()>;

    fn write_int<N: PrimInt>(&mut self, nbits: usize, value: N) -> Result<()> { ... }
    fn write_int_be<N: PrimInt>(&mut self, nbits: usize, value: N) -> Result<()> { ... }
}

Allows writing bits to a sink.

Required Methods

fn write_bit(&mut self, value: bool) -> Result<()>

Writes a single bit to the sink.

Provided Methods

fn write_int<N: PrimInt>(&mut self, nbits: usize, value: N) -> Result<()>

Writes the lower nbits of value, least-significant first.

fn write_int_be<N: PrimInt>(&mut self, nbits: usize, value: N) -> Result<()>

Writes the lower nbits of value, most-significant first.

Implementors