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 explicit ZlibInflate(std::span<const uint8_t> input);
16 ZlibInflate(const ZlibInflate&) = delete;
21
22 void skip(size_t num);
23 [[nodiscard]] uint8_t getByte();
24 [[nodiscard]] unsigned get16LE();
25 [[nodiscard]] unsigned get32LE();
26 [[nodiscard]] std::string getString(size_t len);
27 [[nodiscard]] std::string getCString();
28
29 [[nodiscard]] size_t inflate(MemBuffer<uint8_t>& output, size_t sizeHint = 65536);
30
31private:
32 z_stream s;
33 bool wasInit;
34};
35
36} // namespace openmsx
37
38#endif
This class manages the lifetime of a block of memory.
Definition MemBuffer.hh:29
ZlibInflate & operator=(const ZlibInflate &)=delete
std::string getString(size_t len)
ZlibInflate & operator=(ZlibInflate &&)=delete
std::string getCString()
ZlibInflate(const ZlibInflate &)=delete
void skip(size_t num)
size_t inflate(MemBuffer< uint8_t > &output, size_t sizeHint=65536)
ZlibInflate(ZlibInflate &&)=delete
This file implemented 3 utility functions:
Definition Autofire.cc:11