mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-06-09 03:22:39 +00:00
Update to ZSTD
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user