mirror of
https://github.com/minetest/minetestmapper.git
synced 2024-11-15 15:10:28 +01:00
22 lines
376 B
C++
22 lines
376 B
C++
#pragma once
|
|
|
|
#include <exception>
|
|
#include "types.h"
|
|
|
|
class ZstdDecompressor
|
|
{
|
|
public:
|
|
class DecompressError : std::exception {};
|
|
|
|
ZstdDecompressor();
|
|
~ZstdDecompressor();
|
|
void setData(const u8 *data, size_t size, size_t seekPos);
|
|
size_t seekPos() const;
|
|
ustring decompress();
|
|
|
|
private:
|
|
void *m_stream; // ZSTD_DStream
|
|
const u8 *m_data;
|
|
size_t m_seekPos, m_size;
|
|
};
|