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