reduce allocations while reading chunks data

This commit is contained in:
MihailRis 2025-12-06 00:58:13 +03:00
parent 21f7390265
commit 9dc9441902
12 changed files with 93 additions and 43 deletions

View file

@ -46,7 +46,7 @@ static void read_voxel_data(ByteReader& reader, util::Buffer<ubyte>& dst) {
auto rleData = gzip::decompress(reader.pointer(), gzipCompressedSize);
reader.skip(gzipCompressedSize);
extrle::decode16(rleData.data(), rleData.size(), dst.data());
extrle::decode16(rleData.data(), rleData.size(), dst.data(), dst.size());
}
void compressed_chunks::decode(