ddn.compressor.deflate_raw
ddn.compressor.deflate_raw
Provider for raw DEFLATE compression format (RFC 1951). This implements DEFLATE without any container/wrapper (no zlib or gzip headers).
Uses the pure D zlib implementation (ddn.compressor.zlib) with negative windowBits to produce raw DEFLATE streams.
Copyright
BSD-3-Clause
Module Initializers 1
shared static this
()Types 2
Raw DEFLATE compressor using ddn.compressor.zlib with negative windowBits. Produces raw DEFLATE streams without zlib/gzip headers (RFC 1951).
Fields
CompressionOptions _optsz_stream _zsOutputSink _sinkubyte[] _inputubyte[] _outputint _windowBitsulong _bytesInulong _bytesOutbool _dictSetbool _finishedMethods
void setOutputSink(OutputSink sink)Set the output sink delegate that will receive produced compressed chunks.void setProgressCallback(ProgressCallback callback)Set an optional progress callback.void write(const(ubyte)[] data)Write uncompressed data to the compressor.void finish()Finish the stream and finalize compression.void reset()Reset the compressor to initial state.bool setDictionary(const(ubyte)[] dict)Set compression dictionary for better compression ratios.bool isFinished() @property constReturns true if finish() has been called and the stream is closed for further writes.void compressInternal(int flush)Constructors
this(CompressionOptions opts)Create a raw DEFLATE compressor with provided options.Destructors
~thisEnsure zlib stream is ended.Raw DEFLATE decompressor using ddn.compressor.zlib with negative windowBits. Decompresses raw DEFLATE streams without zlib/gzip headers (RFC 1951).
Fields
DecompressionOptions _optsz_stream _zsOutputSink _sinkubyte[] _inputubyte[] _outputint _windowBitsulong _bytesInulong _bytesOutbool _dictSetbool _finishedMethods
void setOutputSink(OutputSink sink)Set the output sink delegate that will receive produced decompressed chunks.void setProgressCallback(ProgressCallback callback)Set an optional progress callback.void write(const(ubyte)[] data)Write compressed data to the decompressor.void finish()Finish decompression and finalize.void reset()Reset the decompressor to initial state.bool setDictionary(const(ubyte)[] dict)Set decompression dictionary if required by the compressed stream.bool isFinished() @property constReturns true if finish() has been called and the stream is closed for further writes.void decompressInternal(int flush)Constructors
this(DecompressionOptions opts)Create a raw DEFLATE decompressor with provided options.Destructors
Functions 5
fn
Compressor makeDeflateRawStdZlibCompressor(CompressionOptions opts)Factory function that constructs a raw DEFLATE compressor.fn
Decompressor makeDeflateRawStdZlibDecompressor(DecompressionOptions opts)Factory function that constructs a raw DEFLATE decompressor.