Struct bitstream::padding::LengthPadding
[−]
[src]
pub struct LengthPadding {}
LengthPadding can be used encode the number of bits in the bit stream.
When using this padding, an extra byte is appended at the end of the stream. This byte indicates how many bots in the previous byte are valid.
Methods
impl LengthPadding
[src]
fn new() -> Self
Create a new instance
Trait Implementations
impl Debug for LengthPadding
[src]
impl Default for LengthPadding
[src]
fn default() -> LengthPadding
Returns the "default value" for a type. Read more
impl Padding for LengthPadding
[src]
fn max_size(&self) -> usize
Get the maximum size of the padding. Read more
fn pad<W: Write>(
&self,
last_byte: u8,
byte_fill: u8,
writer: &mut W
) -> IOResult<()>
&self,
last_byte: u8,
byte_fill: u8,
writer: &mut W
) -> IOResult<()>
Pad the last bits of the stream. Read more
fn bits_left(&self, last_bytes: &[u8]) -> IOResult<usize>
Determine how many bits are left to read. Read more