Skip to content

Commit

Permalink
System: Use default compression level
Browse files Browse the repository at this point in the history
I'd intended to make this an option.
  • Loading branch information
stenzek committed Jul 29, 2024
1 parent 534a82d commit 33f6cc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2995,7 +2995,7 @@ u32 System::CompressAndWriteStateData(std::FILE* fp, std::span<const u8> src, Sa

uLongf compressed_size = static_cast<uLongf>(buffer_size);
const int err =
compress2(buffer.data(), &compressed_size, src.data(), static_cast<uLong>(src.size()), Z_BEST_COMPRESSION);
compress2(buffer.data(), &compressed_size, src.data(), static_cast<uLong>(src.size()), Z_DEFAULT_COMPRESSION);
if (err != Z_OK) [[unlikely]]
{
Error::SetStringFmt(error, "compress2() failed: {}", err);
Expand All @@ -3009,7 +3009,7 @@ u32 System::CompressAndWriteStateData(std::FILE* fp, std::span<const u8> src, Sa
const size_t buffer_size = ZSTD_compressBound(src.size());
buffer.resize(buffer_size);

const size_t compressed_size = ZSTD_compress(buffer.data(), buffer_size, src.data(), src.size(), 19);
const size_t compressed_size = ZSTD_compress(buffer.data(), buffer_size, src.data(), src.size(), 0);
if (ZSTD_isError(compressed_size)) [[unlikely]]
{
const char* errstr = ZSTD_getErrorString(ZSTD_getErrorCode(compressed_size));
Expand Down

0 comments on commit 33f6cc2

Please sign in to comment.