1
0
mirror of https://github.com/luanti-org/minetestmapper.git synced 2025-10-06 22:05:22 +02:00

Reuse allocations for decompression

This commit is contained in:
sfan5
2025-03-05 22:02:16 +01:00
parent 3c08380d18
commit 0a56b18cfb
6 changed files with 23 additions and 33 deletions

View File

@@ -11,8 +11,10 @@ public:
ZstdDecompressor();
~ZstdDecompressor();
void setData(const u8 *data, size_t size, size_t seekPos);
size_t seekPos() const;
ustring decompress();
size_t seekPos() const { return m_seekPos; }
// Decompress and return one zstd stream from the buffer
// Advances seekPos as appropriate.
void decompress(ustring &dst);
private:
void *m_stream; // ZSTD_DStream