Skip to main content

zstd_fast

Function zstd_fast 

Source
pub fn zstd_fast(p: FastIn<'_>) -> (usize, [u32; 2])
Expand description

zstd’s fast (level 1: one table) and double-fast (levels 2-3: long_log > 0) match finders over buf[from..to], appending matches to out; returns the literals left after the last match and the repeat offsets. Same results as simoom-compress’s safe Fast.

Every read is at a position the loops keep at most to - 8 (to - 9 for double fast) or below a position already read, or inside a match count bounded by to; tables are indexed by masked hashes.

§Panics

If from <= to <= buf.len() or the table sizes (non-zero powers of two) do not hold.