File: ZlibDecompressor.h

package info (click to toggle)
minetestmapper 20241111-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 300 kB
  • sloc: cpp: 2,635; python: 143; sh: 68; ansic: 30; makefile: 9
file content (20 lines) | stat: -rw-r--r-- 344 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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;
};