Zastąpienie makra zmienną globalną compression_level

This commit is contained in:
yanczi 2025-12-24 15:04:16 +01:00
parent 336e12d8c0
commit 109d10c3ca
2 changed files with 5 additions and 5 deletions

View file

@ -23,9 +23,6 @@ CompressionManager::CompressionManager()
:cctx(ZSTD_createCCtx())
,dctx(ZSTD_createDCtx())
{
// Tu ustawienia pod kompresjê
const int level = COMPRESSION_LEVEL;
// Ustawienia frameless
size_t rc = 0;
@ -42,7 +39,7 @@ CompressionManager::CompressionManager()
rc |= ZSTD_CCtx_setParameter(cctx, ZSTD_c_dictIDFlag, 0);
// Ustawia poziom kompresji
rc |= ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, level);
rc |= ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, zstd::compression_level);
if (ZSTD_isError(rc)) {
std::cerr << "ZSTD_CCtx_setParameter error" << std::endl;