Compresses and uncompresses data using zlib.
More...
#include <OpenMS/FORMAT/ZlibCompression.h>
|
static void | compressString (std::string &raw_data, std::string &compressed_data) |
| Compresses data using zlib directly. More...
|
|
static void | compressData (const void *raw_data, const size_t in_length, std::string &compressed_data) |
| Compresses data using zlib directly. More...
|
|
static void | compressString (const QByteArray &raw_data, QByteArray &compressed_data) |
| Compresses data using Qt. More...
|
|
static void | uncompressString (const void *compressed_data, size_t nr_bytes, std::string &raw_data) |
| Uncompresses data using Qt (wrapper around Qt function) More...
|
|
static void | uncompressString (const QByteArray &compressed_data, QByteArray &raw_data) |
| Uncompresses data using Qt. More...
|
|
Compresses and uncompresses data using zlib.
- Note
- The 'strings' here are not really null-terminated but rather containers of data. If you want safe conversions, use QtByteArray.
◆ compressData()
static void compressData |
( |
const void * |
raw_data, |
|
|
const size_t |
in_length, |
|
|
std::string & |
compressed_data |
|
) |
| |
|
static |
Compresses data using zlib directly.
- Parameters
-
raw_data | Data to be compressed |
in_length | Length of raw_data in bytes |
compressed_data | Compressed result data |
Referenced by Base64::encode(), and Base64::encodeIntegers().
◆ compressString() [1/2]
static void compressString |
( |
const QByteArray & |
raw_data, |
|
|
QByteArray & |
compressed_data |
|
) |
| |
|
static |
Compresses data using Qt.
- Parameters
-
raw_data | Data to be compressed |
compressed_data | Compressed result data |
◆ compressString() [2/2]
static void compressString |
( |
std::string & |
raw_data, |
|
|
std::string & |
compressed_data |
|
) |
| |
|
static |
Compresses data using zlib directly.
- Parameters
-
raw_data | Data to be compressed |
compressed_data | Compressed result data |
◆ uncompressString() [1/2]
static void uncompressString |
( |
const QByteArray & |
compressed_data, |
|
|
QByteArray & |
raw_data |
|
) |
| |
|
static |
Uncompresses data using Qt.
- Parameters
-
compressed_data | Compressed data |
raw_data | Uncompressed result data |
◆ uncompressString() [2/2]
static void uncompressString |
( |
const void * |
compressed_data, |
|
|
size_t |
nr_bytes, |
|
|
std::string & |
raw_data |
|
) |
| |
|
static |
Uncompresses data using Qt (wrapper around Qt function)
- Parameters
-
compressed_data | Compressed data |
nr_bytes | Number of bytes in compressed data |
raw_data | Uncompressed result data |