decompressBuffer
fn
ubyte[] decompressBuffer(const(ubyte)[] input,
DecompressionOptions opts = DecompressionOptions.init,
string providerName = null)Decompress a whole buffer in one call.
Parameters
input | Compressed data to decompress. |
opts | Decompression options; with the default auto-detection the input's format is detected from its magic bytes. |
providerName | Optional 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).
fn
ubyte[] 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
fmt | The compression format to use. |
input | Compressed data to decompress. |
providerName | Optional 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.