openMSX
ZlibInflate.hh
Go to the documentation of this file.
1#ifndef ZLIBINFLATE_HH
2#define ZLIBINFLATE_HH
3
4#include "MemBuffer.hh"
5#include <cstdint>
6#include <span>
7#include <string>
8#include <zlib.h>
9
10namespace openmsx {
11
13{
14public:
15 ZlibInflate(std::span<const uint8_t> input);
17
18 void skip(size_t num);
19 [[nodiscard]] uint8_t getByte();
20 [[nodiscard]] unsigned get16LE();
21 [[nodiscard]] unsigned get32LE();
22 [[nodiscard]] std::string getString(size_t len);
23 [[nodiscard]] std::string getCString();
24
25 [[nodiscard]] size_t inflate(MemBuffer<uint8_t>& output, size_t sizeHint = 65536);
26
27private:
28 z_stream s;
29 bool wasInit;
30};
31
32} // namespace openmsx
33
34#endif
This class manages the lifetime of a block of memory.
Definition MemBuffer.hh:29
std::string getString(size_t len)
std::string getCString()
void skip(size_t num)
size_t inflate(MemBuffer< uint8_t > &output, size_t sizeHint=65536)
This file implemented 3 utility functions:
Definition Autofire.cc:9