Skip to main content

decode_with_limit

Function decode_with_limit 

Source
pub fn decode_with_limit(buf: Vec<u8>, max_bytes: u64) -> Result<DbfData, Error>
Expand description

Same as decode, failing with Error::TooLarge if the file would decompress to more than max_bytes. Lower it when reading untrusted files: a PKWare DCL stream can expand to hundreds of times its size.