Inflate.h header
#include <ew/app/Inflate.h>
Namespace ew::app
Functions
QByteArray ew::app::inflateRaw(const QByteArray &deflated, int maxOutput=64 *1024 *1024)
Decompresses a raw DEFLATE stream (RFC 1951 – no zlib or gzip wrapper) into its original bytes.
This is the decompression counterpart to the STORED/DEFLATE archives read from .docx, .epub and other ZIP containers, where each entry's payload is a headerless DEFLATE stream. All three block types are handled: stored, fixed-Huffman, and dynamic-Huffman, including LZ77 back references. Truncated or malformed input yields whatever was decoded before the error (an empty array if nothing was), never a throw. maxOutput caps the result size as a guard against malicious or corrupt streams; decoding stops once it is reached.