Parameters
fmt | The compression format to estimate for |
inputSize | Size of the uncompressed input data in bytes |
Returns
Upper bound estimate of compressed size in bytes
Examples
// Pre-allocate buffer for GZIP compression
auto inputData = cast(ubyte[])"Hello, World!";
auto bufferSize = estimateCompressedSize(CompressionFormat.GZIP, inputData.length);
auto outputBuffer = new ubyte[](bufferSize);