Revert "Update to ZSTD"

This reverts commit f3a175c640.
This commit is contained in:
GabsPuNs
2026-06-05 20:21:06 -04:00
parent f3a175c640
commit 90cf815860
12 changed files with 131 additions and 65 deletions

View File

@@ -182,7 +182,7 @@ void GameRuleManager::loadGameRules(LevelGenerationOptions *lgo, BYTE *dIn, UINT
dis.read(compr_content);
Compression::getCompression()->SetDecompressionType( static_cast<Compression::ECompressionTypes>(compression_type) );
Compression::getCompression()->DecompressZSTDRLE( content.data, &content.length,
Compression::getCompression()->DecompressLZXRLE( content.data, &content.length,
compr_content.data, compr_content.length);
Compression::getCompression()->SetDecompressionType( SAVE_FILE_PLATFORM_LOCAL );
@@ -301,7 +301,7 @@ void GameRuleManager::saveGameRules(BYTE **dOut, UINT *dSize)
// Compress compr_dos and write to dos.
byteArray compr_ba(new BYTE[ compr_baos.buf.length ], compr_baos.buf.length);
Compression::getCompression()->CompressZSTDRLE( compr_ba.data, &compr_ba.length,
Compression::getCompression()->CompressLZXRLE( compr_ba.data, &compr_ba.length,
compr_baos.buf.data, compr_baos.buf.length );
app.DebugPrintf("\tcompr_ba.length=%d.\n\tcompr_baos.buf.length=%d.\n",
@@ -434,8 +434,8 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, BYTE *dIn, UINT
#ifndef _CONTENT_PACKAGE
assert( compressionType == APPROPRIATE_COMPRESSION_TYPE );
#endif
// 4J-JEV: DecompressZSTDRLE uses the correct platform specific compression type. (need to assert that the data is compressed with it though).
Compression::getCompression()->DecompressZSTDRLE(decompressedBuffer.data, &decompressedBuffer.length, compressedBuffer.data, compressedSize);
// 4J-JEV: DecompressLZXRLE uses the correct platform specific compression type. (need to assert that the data is compressed with it though).
Compression::getCompression()->DecompressLZXRLE(decompressedBuffer.data, &decompressedBuffer.length, compressedBuffer.data, compressedSize);
break;
/* 4J-JEV:
Each platform has only 1 method of compression, 'compression.h' file deals with it.