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