minetestmapper/include/ZlibDecompressor.h

22 lines
352 B
C
Raw 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;
size_t m_seekPos;
size_t m_size;
};