Skip to main content

sequence_bound

Function sequence_bound 

Source
pub const fn sequence_bound(src_size: usize) -> usize
Expand description

Upper bound on the sequences a parse of src_size bytes can hold, block delimiters included (C ZSTD_sequenceBound): one per minimal match, and one delimiter per smallest block.

use structured_zstd::encoding::sequences::sequence_bound;
assert_eq!(sequence_bound(0), 2);
assert_eq!(sequence_bound(3000), 1004);