Update to ZSTD

This commit is contained in:
GabsPuNs
2026-06-05 18:48:58 -04:00
parent 267e233f01
commit f3a175c640
12 changed files with 64 additions and 130 deletions

View File

@@ -75,7 +75,7 @@ BlockRegionUpdatePacket::BlockRegionUpdatePacket(int x, int y, int z, int xs, in
unsigned char *ucTemp = new unsigned char[(256 * 16 * 16 * 5)/2];
unsigned int inputSize = (256 * 16 * 16 * 5)/2;
Compression::getCompression()->CompressLZXRLE(ucTemp, &inputSize, rawBuffer.data, (unsigned int) rawBuffer.length);
Compression::getCompression()->CompressZSTDRLE(ucTemp, &inputSize, rawBuffer.data, (unsigned int) rawBuffer.length);
//app.DebugPrintf("Chunk (%d,%d) compressed from %d to size %d\n", x>>4, z>>4, rawBuffer.length, inputSize);
unsigned char *ucTemp2 = new unsigned char[inputSize];
memcpy(ucTemp2,ucTemp,inputSize);
@@ -131,7 +131,7 @@ void BlockRegionUpdatePacket::read(DataInputStream *dis) //throws IOException
if( success )
{
Compression::getCompression()->DecompressLZXRLE( buffer.data, &outputSize, compressedBuffer.data, size);
Compression::getCompression()->DecompressZSTDRLE( buffer.data, &outputSize, compressedBuffer.data, size);
}
else
{