AuroraRuntime/Include/Aurora/Compression/CompressionInfo.hpp

50 lines
1.1 KiB
C++
Raw Normal View History

2021-06-27 21:25:29 +00:00
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: CompressionInfo.hpp
2021-09-06 10:58:08 +00:00
Date: 2021-7-14
2021-06-27 21:25:29 +00:00
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 {};
2021-06-27 21:25:29 +00:00
};
struct DecompressInfo
{
ECompresionType alg {ECompresionType::eDeflate};
2021-09-29 08:03:08 +00:00
DecompressInfo(ECompresionType alg) : alg(alg)
{
}
AuUInt32 internalStreamSize {};
bool permitResize {};
};
2021-06-27 21:25:29 +00:00
}