OpenMS  2.8.0
Static Public Member Functions | List of all members
ZlibCompression Class Reference

Compresses and uncompresses data using zlib. More...

#include <OpenMS/FORMAT/ZlibCompression.h>

Static Public Member Functions

static void compressString (std::string &raw_data, 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...
 

Detailed Description

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.

Member Function Documentation

◆ compressString() [1/2]

static void compressString ( const QByteArray &  raw_data,
QByteArray &  compressed_data 
)
static

Compresses data using Qt.

Parameters
raw_dataData to be compressed
compressed_dataCompressed result data

◆ compressString() [2/2]

static void compressString ( std::string &  raw_data,
std::string &  compressed_data 
)
static

Compresses data using zlib directly.

Parameters
raw_dataData to be compressed
compressed_dataCompressed result data

◆ uncompressString() [1/2]

static void uncompressString ( const QByteArray &  compressed_data,
QByteArray &  raw_data 
)
static

Uncompresses data using Qt.

Parameters
compressed_dataCompressed data
raw_dataUncompressed 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_dataCompressed data
nr_bytesNumber of bytes in compressed data
raw_dataUncompressed result data