pub struct Huf4<'a> {
pub table: &'a [u16; 2048],
pub src: &'a [u8],
pub starts: [usize; 4],
pub pos: [usize; 4],
pub bits: [u64; 4],
pub out: &'a mut [u8],
pub seg: usize,
pub done: usize,
}Expand description
The state of zstd’s four-stream Huffman fast loop (HUF_decompress4X1 “fast”): per stream a left-aligned 64-bit container with a marker bit below the unread bits, and its position in the input.
Fields§
§table: &'a [u16; 2048]Entries symbol << 8 | bits, indexed by the next 11 bits.
src: &'a [u8]The four streams, one after another.
starts: [usize; 4]Where each stream starts in src.
pos: [usize; 4]Each stream’s position (the 8 bytes loaded last): starts[j] <= pos[j],
pos[j] + 8 <= src.len().
bits: [u64; 4]§out: &'a mut [u8]The output: stream j writes out[j * seg + i]; stream 3 has out.len() - 3 * seg.
seg: usize§done: usizeSymbols per stream done so far.
Auto Trait Implementations§
impl<'a> !UnwindSafe for Huf4<'a>
impl<'a> Forget for Huf4<'a>
impl<'a> Freeze for Huf4<'a>
impl<'a> Move for Huf4<'a>
impl<'a> RefUnwindSafe for Huf4<'a>
impl<'a> Send for Huf4<'a>
impl<'a> Sync for Huf4<'a>
impl<'a> Unpin for Huf4<'a>
impl<'a> UnsafeUnpin for Huf4<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more