Static Public Member Functions | List of all members
GZip Struct Referencefinal

GZip compression utilities. More...

#include <Compression.hpp>

Static Public Member Functions

static void gunzip (const Resource::File &input, const Resource::File &output)
 Gunzip the specified input file to the specified output file. More...
 
static void gunzip (const Resource::File &input, std::string &output)
 Gunzip the specified file to a string. More...
 
static void gunzip (const Resource::File &input, std::unique_ptr< std::istream > &stream)
 Get an input stream of the uncompressed contents of the specified gzipped input file. More...
 
static void gzip (const Resource::File &input, const Resource::File &output)
 Gzip the specified input file to the specified output file. More...
 
static void gzip (const std::string &input, const Resource::File &output)
 Gzip the supplied string to the specified output file. More...
 
static void gzip (std::istream &input, const Resource::File &output)
 Gzip the supplied input stream to the specified output file. More...
 

Detailed Description

GZip compression utilities.

Member Function Documentation

◆ gunzip() [1/3]

static void gunzip ( const Resource::File input,
const Resource::File output 
)
inlinestatic

Gunzip the specified input file to the specified output file.

Parameters
inputthe gzipped file
outputthe file to write the uncompressed stream to

◆ gunzip() [2/3]

static void gunzip ( const Resource::File input,
std::string &  output 
)
inlinestatic

Gunzip the specified file to a string.

Be sure that the data will fit in memory (e.g. check the file size before calling), or the application will cause a catastophic memory failure.

Parameters
inputthe gzipped file
Returns
a string containing the uncompressed data

◆ gunzip() [3/3]

static void gunzip ( const Resource::File input,
std::unique_ptr< std::istream > &  stream 
)
inlinestatic

Get an input stream of the uncompressed contents of the specified gzipped input file.

Parameters
inputthe gzipped file
Returns
an input stream wrapper supplying a uncompressed stream

◆ gzip() [1/3]

static void gzip ( const Resource::File input,
const Resource::File output 
)
inlinestatic

Gzip the specified input file to the specified output file.

Parameters
inputthe file to gzip
outputthe file to write the gzipped stream to

◆ gzip() [2/3]

static void gzip ( const std::string &  input,
const Resource::File output 
)
inlinestatic

Gzip the supplied string to the specified output file.

Parameters
inputthe string to gzip
outputthe file to write the gzipped stream to

◆ gzip() [3/3]

static void gzip ( std::istream &  input,
const Resource::File output 
)
inlinestatic

Gzip the supplied input stream to the specified output file.

Parameters
inputthe input stream to gzip
outputthe file to write the gzipped stream to

The documentation for this struct was generated from the following file: