/*** Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: CompressionInfo.hpp Date: 2021-7-14 Author: Reece ***/ #pragma once namespace Aurora::Compression { struct CompressionInfo { ECompresionType type; /// ZSTD: -5 <= level <= 22 /// recommended: ZSTD_CLEVEL_DEFAULT /// LZMA: 0 <= level <= 9 /// LZ4 : N/A /// ZLIB: 0 <= x >= 9 /// recommended: 6 /// BZIP: 0 <= x >= 9 AuInt8 compressionLevel{}; /// LZMA: 5 <= fb <= 273, default = 32 AuUInt32 fbWordSize{}; /// LZMA only /// (1 << 12) <= dictSize <= (1 << 27) for 32-bit version /// (1 << 12) <= dictSize <= (3 << 29) for 64-bit version /// default = (1 << 24) AuUInt32 dictSize{}; // 64KiB is a recommended "small" block size AuUInt16 lz4BlockSize {}; }; struct DecompressInfo { ECompresionType alg {ECompresionType::eDeflate}; DecompressInfo(ECompresionType alg) : alg(alg) { } AuUInt32 internalStreamSize {}; bool permitResize {}; }; }