Loading...
Searching...
No Matches
compress_module.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2025 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 COMPRESS_MODULE_HPP
#define COMPRESS_MODULE_HPP
#include "../my_config.h"
#include "integers.hpp"
#include "compression.hpp"
#include <memory>
namespace libdar
{
class compress_module
{
public:
compress_module() {};
compress_module(const compress_module & ref) = default;
compress_module(compress_module && ref) noexcept = default;
compress_module & operator = (const compress_module & ref) = default;
compress_module & operator = (compress_module && ref) noexcept = default;
virtual ~compress_module() = default;
virtual compression get_algo() const = 0;
virtual U_I get_max_compressing_size() const = 0;
virtual U_I get_min_size_to_compress(U_I clear_size) const = 0;
virtual U_I compress_data(const char *normal,
const U_I normal_size,
char *zip_buf,
U_I zip_buf_size) const = 0;
virtual U_I uncompress_data(const char *zip_buf,
const U_I zip_buf_size,
char *normal,
U_I normal_size) const = 0;
virtual std::unique_ptr<compress_module> clone() const = 0;
};
} // end of namespace
#endif
compression.hpp
compression parameters for API
libdar::compression
compression
the different compression algorithm available
Definition compression.hpp:46
integers.hpp
are defined here basic integer types that tend to be portable
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