minetestmapper/include/ZlibDecompressor.h
2022-02-09 23:09:32 +01:00

21 lines
344 B
C++

#pragma once
#include <exception>
#include "types.h"
class ZlibDecompressor
{
public:
class DecompressError : std::exception {};
ZlibDecompressor(const u8 *data, size_t size);
~ZlibDecompressor();
void setSeekPos(size_t seekPos);
size_t seekPos() const;
ustring decompress();
private:
const u8 *m_data;
size_t m_seekPos, m_size;
};