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  uint8_t getByte();
20  unsigned get16LE();
21  unsigned get32LE();
22  std::string getString(size_t len);
23  std::string getCString();
24 
25  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
ZlibInflate(span< uint8_t > input)
Definition: ZlibInflate.cc:8
Definition: span.hh:34
std::string getCString()
Definition: ZlibInflate.cc:73
std::string getString(size_t len)
Definition: ZlibInflate.cc:64
void skip(size_t num)
Definition: ZlibInflate.cc:31
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
size_t inflate(MemBuffer< uint8_t > &output, size_t sizeHint=65536)
Definition: ZlibInflate.cc:82