ZipStreamDecompressor

Zlib decoder which supports both gzip and pkzip compressed streams.

Pkzip files are supported only if they contain a single file which is located at the start of the archive, and which contain a complete local file header record (that is, the length and CRC of that file are specified at the start of the archive).

Constructors

this
this()

Constructor

Members

Classes

DecompressionException
class DecompressionException

Reusable exception thrown when a zip file cannot be decompressed

Functions

decompress
ubyte[] decompress(const(ubyte)[] data)

Decompress a chunk of input data

endDecompression
bool endDecompression()

Release the resources used for decompression, and perform a consistency check

reset
void reset()

Begin processing of a compressed file

Variables

object_pool_index
size_t object_pool_index;

Object pool index, allows instances of this type to be stored in a pool.

Inherited Members

From ZlibStreamDecompressor

Encoding
alias Encoding = ZlibInput.Encoding

Alias for encoding enum, to avoid public import.

~this
~this()

Destructor. Makes sure the C-allocated stream is destroyed.

start
void start(Encoding encoding)

Starts decompression of a stream.

end
bool end()

Ends decompression of a stream. Releases the C-allocated resources.

decodeChunk
void decodeChunk(ubyte[] compressed_chunk, void delegate(ubyte[] decompressed_chunk) output_dg)

Decodes a chunk of data from the stream and passes the resulting decompressed data chunks to the provided output delegate. A single input chunk may invoke the output delegate several times.

Meta