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

@@ -244,7 +244,7 @@ DataInputStream *RegionFile::getChunkDataInputStream(int x, int z) // TODO - was
if( useRLE )
{
Compression::getCompression()->DecompressZSTDRLE(decomp, &readDecompLength, data, length );
Compression::getCompression()->DecompressLZXRLE(decomp, &readDecompLength, data, length );
}
else
{
@@ -277,7 +277,7 @@ void RegionFile::write(int x, int z, BYTE *data, int length) // TODO - was sync
// 4J Stu - Do the compression here so that we know how much space we need to store the compressed data
BYTE *compData = new BYTE[length + 2048]; // presuming compression is going to make this smaller... UPDATE - for some really small things this isn't the case. Added 2K on here to cover those.
unsigned int compLength = length;
Compression::getCompression()->CompressZSTDRLE(compData,&compLength,data,length);
Compression::getCompression()->CompressLZXRLE(compData,&compLength,data,length);
int sectorsNeeded = (compLength + CHUNK_HEADER_SIZE) / SECTOR_BYTES + 1;