decompressBuffer

fnubyte[] decompressBuffer(const(ubyte)[] input, DecompressionOptions opts = DecompressionOptions.init, string providerName = null)

Decompress a whole buffer in one call.

Parameters

inputCompressed data to decompress.
optsDecompression options; with the default auto-detection the input's format is detected from its magic bytes.
providerNameOptional provider name; if null, the highest-priority provider is used.

Returns

Decompressed data as a newly allocated buffer.

Throws

CompressionError if the format cannot be detected, no provider is

registered, the provider does not implement decompression, or decompression fails (including exceeding opts.maxOutputSize).

fnubyte[] decompressBuffer(CompressionFormat fmt, const(ubyte)[] input, string providerName = null)

Convenience: decompress a whole buffer with just a format specification.

This is a simpler overload when you only need to specify the compression format.

Parameters

fmtThe compression format to use.
inputCompressed data to decompress.
providerNameOptional provider name; if null, the highest-priority provider is used.

Returns

Decompressed data as a new buffer.

Throws

CompressionError if decompression fails or no provider is registered for the format.