Loading...
Searching...
No Matches
compression.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2024 Denis Corbin
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// to contact the author, see the AUTHOR file
/*********************************************************************/
#ifndef COMPRESSION_HPP
#define COMPRESSION_HPP
#include "../my_config.h"
#include <string>
namespace libdar
{
enum class compression
{
none = 'n',
gzip = 'z',
bzip2 = 'y',
lzo = 'l',
xz = 'x',
lzo1x_1_15 = 'j',
lzo1x_1 = 'k',
zstd = 'd',
lz4 = 'q',
};
extern compression char2compression(char a);
extern bool char2compression_mode(char a);
extern char compression2char(compression c, bool per_block = false);
extern std::string compression2string(compression c);
extern compression string2compression(const std::string & a); // throw Erange if an unknown string is given
} // end of namespace
#endif
libdar::compression2string
std::string compression2string(compression c)
convert a compression to its string representation
libdar::compression2char
char compression2char(compression c, bool per_block=false)
convert a compression value to a char for storing in archive
libdar::char2compression_mode
bool char2compression_mode(char a)
libdar::char2compression
compression char2compression(char a)
convert a char as stored in archive to its compression value
libdar::string2compression
compression string2compression(const std::string &a)
convert a string representing a compression algorithm to its enum compression value
libdar::compression
compression
the different compression algorithm available
Definition compression.hpp:46
libdar::hash_algo::none
@ none
no hashing algorithm
libdar::compression::bzip2
@ bzip2
bzip2 compression (streamed)
libdar::compression::zstd
@ zstd
zstd compression
libdar::compression::lzo
@ lzo
lzo compression (streamed)
libdar::compression::lzo1x_1
@ lzo1x_1
lzo degraded algo corresponding to lzo -2 to lzo -6
libdar::compression::lzo1x_1_15
@ lzo1x_1_15
lzo degraded algo corresponding to lzop -1
libdar::compression::gzip
@ gzip
gzip compression (streamed)
libdar::compression::xz
@ xz
lzma compression (streamed)
libdar::compression::lz4
@ lz4
lz4 (streamed)
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47