Function snap::raw::decompress_len

source ·
pub fn decompress_len(input: &[u8]) -> Result<usize>
Expand description

Returns the decompressed size (in bytes) of the compressed bytes given.

input must be a sequence of bytes returned by a conforming Snappy compressor.

Errors

This function returns an error in the following circumstances:

  • An invalid Snappy header was seen.
  • The total space required for decompression exceeds 2^32 - 1.