Struct inflate::InflateStream

source ·
pub struct InflateStream { /* private fields */ }

Implementations

Create a new stream for decoding raw deflate encoded data.

Create a new stream for decoding deflate encoded data with a zlib header and footer

Create a new stream for decoding deflate encoded data with a zlib header and footer

This version creates a decoder that does not checksum the data to validate it with the checksum provided with the zlib wrapper.

Try to uncompress/decode the data in data.

On success, returns how many bytes of the input data was decompressed, and a reference to the buffer containing the decompressed data.

This function may not uncompress all the provided data in one call, so it has to be called repeatedly with the data that hasn’t been decompressed yet as an input until the number of bytes decoded returned is 0. (See the top level crate documentation for an example.)

Errors

If invalid input data is encountered, a string describing what went wrong is returned.

Returns the calculated checksum value of the currently decoded data.

Will return 0 for cases where the checksum is not validated.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.