Zip (de)compressor.
More...
#include <ZLib.hpp>
|
static std::string | encode (const std::string &input) |
| Compresses string into ZLib.
|
|
static std::string | decode (const std::string &input) |
| Decompresses string into ZLib.
|
|
|
| ZLib (const Mode mode) |
| Constructor.
|
|
std::string | compressor (const std::string &input) |
| Compresses string.
|
|
std::string | finish () |
| Completes the compression.
|
|
std::string | decompressor (const std::string &input) |
| Decompresses a zlib string.
|
|
Zip (de)compressor.
Definition at line 21 of file ZLib.hpp.
◆ Mode
ZLib mode to start in.
Enumerator |
---|
COMPRESS | 0 | ZLib deflation.
|
DECOMPRESS | 1 | ZLib inflation.
|
Definition at line 27 of file ZLib.hpp.
◆ ~ZLib()
Destructor.
Definition at line 62 of file ZLib.cpp.
◆ ZLib()
galaxy::ZLib::ZLib |
( |
const Mode | mode | ) |
|
|
private |
Constructor.
- Parameters
-
mode | ZLib mode to start in. |
Definition at line 23 of file ZLib.cpp.
◆ encode()
std::string galaxy::ZLib::encode |
( |
const std::string & | input | ) |
|
|
staticnodiscard |
Compresses string into ZLib.
- Parameters
-
input | Input data to convert. |
- Returns
- Returns output data if successful, std::nullopt otherwise.
Definition at line 81 of file ZLib.cpp.
◆ decode()
std::string galaxy::ZLib::decode |
( |
const std::string & | input | ) |
|
|
staticnodiscard |
Decompresses string into ZLib.
- Parameters
-
input | Input data to convert. |
- Returns
- Returns output data if successful, std::nullopt otherwise.
Definition at line 124 of file ZLib.cpp.
◆ compressor()
std::string galaxy::ZLib::compressor |
( |
const std::string & | input | ) |
|
|
nodiscardprivate |
Compresses string.
- Parameters
-
- Returns
- Compressed string.
Definition at line 165 of file ZLib.cpp.
◆ finish()
std::string galaxy::ZLib::finish |
( |
| ) |
|
|
nodiscardprivate |
Completes the compression.
- Returns
- Compressed string containing termination block.
Definition at line 219 of file ZLib.cpp.
◆ decompressor()
std::string galaxy::ZLib::decompressor |
( |
const std::string & | input | ) |
|
|
nodiscardprivate |
Decompresses a zlib string.
- Parameters
-
- Returns
- String containing decompressed data.
Definition at line 265 of file ZLib.cpp.
◆ m_mode
Mode galaxy::ZLib::m_mode |
|
private |
◆ m_stream
z_stream galaxy::ZLib::m_stream |
|
private |
Stream object.
Definition at line 110 of file ZLib.hpp.
◆ m_finished
bool galaxy::ZLib::m_finished |
|
private |
Has the compression finished.
Definition at line 115 of file ZLib.hpp.
◆ m_in
◆ m_out
Output buffer.
Definition at line 125 of file ZLib.hpp.
The documentation for this class was generated from the following files: