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 "span.hh"
6 #include <cstdint>
7 #include <string>
8 #include <zlib.h>
9 
10 namespace openmsx {
11 
13 {
14 public:
16  ~ZlibInflate();
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 
27 private:
28  z_stream s;
29  bool wasInit;
30 };
31 
32 } // namespace openmsx
33 
34 #endif
std::string getString(size_t len)
Definition: ZlibInflate.cc:63
ZlibInflate(span< const uint8_t > input)
Definition: ZlibInflate.cc:9
std::string getCString()
Definition: ZlibInflate.cc:71
void skip(size_t num)
Definition: ZlibInflate.cc:32
size_t inflate(MemBuffer< uint8_t > &output, size_t sizeHint=65536)
Definition: ZlibInflate.cc:80
This file implemented 3 utility functions:
Definition: Autofire.cc:9