zrip 0.1.4

Pure Rust zstd codec: Fast/DFast strategies (levels -7..4), COVER/FastCOVER dict builder
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::huffman::HuffmanDecodeEntry;

#[inline(always)]
pub unsafe fn decode_table_get_unchecked(
    table: &[HuffmanDecodeEntry],
    idx: usize,
) -> &HuffmanDecodeEntry {
    debug_assert!(idx < table.len());
    // SAFETY: caller ensures idx < table.len(). idx = peek_bits(table_log) < 2^table_log = table.len().
    unsafe { table.get_unchecked(idx) }
}