minetestmapper/include/ZlibDecompressor.h

21 lines
344 B
C
Raw Permalink Normal View History

#pragma once
2012-09-18 10:43:34 +02:00
#include <exception>
#include "types.h"
2012-09-18 10:43:34 +02:00
class ZlibDecompressor
{
public:
class DecompressError : std::exception {};
2012-09-18 10:43:34 +02:00
ZlibDecompressor(const u8 *data, size_t size);
2012-09-18 10:43:34 +02:00
~ZlibDecompressor();
void setSeekPos(size_t seekPos);
size_t seekPos() const;
ustring decompress();
2012-09-18 10:43:34 +02:00
private:
const u8 *m_data;
2022-02-09 22:46:07 +01:00
size_t m_seekPos, m_size;
};