1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 16:24:35 +01:00

Use ZStandard for Park and Replay Files (#24734)

This commit is contained in:
LRFLEW
2025-08-06 14:50:18 -05:00
committed by GitHub
parent 8ef4b207b9
commit 52e3c774bc
21 changed files with 284 additions and 61 deletions

View File

@@ -139,6 +139,8 @@ static bool OnCrash(
FileStream source(dumpFilePath, FileMode::open);
FileStream dest(dumpFilePathGZIP, FileMode::write);
// We could switch this to zstdCompress() if supported by backtrace.io. If you switch it,
// use the extension .zst and ZstdMetadataType::both to use the appropriate metadata.
if (Compression::zlibCompress(source, source.GetLength(), dest, Compression::ZlibHeaderType::gzip))
{
// TODO: enable upload of gzip-compressed dumps once supported on
@@ -183,7 +185,7 @@ static bool OnCrash(
exporter->ExportObjectsList = objManager.GetPackableObjects();
auto& gameState = getGameState();
exporter->Export(gameState, saveFilePathUTF8.c_str());
exporter->Export(gameState, saveFilePathUTF8.c_str(), kParkFileSaveCompressionLevel);
savedGameDumped = true;
}
catch (const std::exception& e)