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.
|
| |
|
| static constexpr const auto | ChunkSize = 16384 |
| | ZLib parsing chunk size.
|
| |
|
| | 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 19 of file ZLib.hpp.
◆ Mode
ZLib mode to start in.
| Enumerator |
|---|
| COMPRESS | 0 | ZLib deflation.
|
| DECOMPRESS | 1 | ZLib inflation.
|
Definition at line 30 of file ZLib.hpp.
◆ ~ZLib()
Destructor.
Definition at line 63 of file ZLib.cpp.
◆ ZLib()
| galaxy::ZLib::ZLib |
( |
const Mode | mode | ) |
|
|
private |
Constructor.
- Parameters
-
| mode | ZLib mode to start in. |
Definition at line 24 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 82 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 125 of file ZLib.cpp.
◆ compressor()
| std::string galaxy::ZLib::compressor |
( |
const std::string & | input | ) |
|
|
nodiscardprivate |
Compresses string.
- Parameters
-
- Returns
- Compressed string.
Definition at line 166 of file ZLib.cpp.
◆ finish()
| std::string galaxy::ZLib::finish |
( |
| ) |
|
|
nodiscardprivate |
Completes the compression.
- Returns
- Compressed string containing termination block.
Definition at line 220 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 266 of file ZLib.cpp.
◆ ChunkSize
| const auto galaxy::ZLib::ChunkSize = 16384 |
|
staticconstexpr |
◆ m_mode
| Mode galaxy::ZLib::m_mode |
|
private |
◆ m_stream
| z_stream galaxy::ZLib::m_stream |
|
private |
Stream object.
Definition at line 113 of file ZLib.hpp.
◆ m_finished
| bool galaxy::ZLib::m_finished |
|
private |
Has the compression finished.
Definition at line 118 of file ZLib.hpp.
◆ m_in
◆ m_out
Output buffer.
Definition at line 128 of file ZLib.hpp.
The documentation for this class was generated from the following files: