| Disk ARchive 2.7.14 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
proto_compressor.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2024 Denis Corbin
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18//
19// to contact the author, see the AUTHOR file
20/*********************************************************************/
21
25
26#ifndef PROTO_COMPRESSOR_HPP
27#define PROTO_COMPRESSOR_HPP
28
29#include "../my_config.h"
30
31#include "infinint.hpp"
32#include "generic_file.hpp"
33#include "compression.hpp"
34
35 namespace libdar
36{
37
38
41
42 class proto_compressor : public generic_file
43 {
44 public :
45 using generic_file::generic_file;
46
47 proto_compressor(const proto_compressor & ref) = default;
48 proto_compressor(proto_compressor && ref) noexcept = default;
49 proto_compressor & operator = (const proto_compressor & ref) = default;
50 proto_compressor & operator = (proto_compressor && ref) noexcept = default;
51 virtual ~proto_compressor() = default;
52
54 virtual compression get_algo() const = 0;
55
57 virtual void suspend_compression() = 0;
58
60 virtual void resume_compression() = 0;
61
63 virtual bool is_compression_suspended() const = 0;
64 };
65
66
67 // used only for block compression
68
69 constexpr const U_I default_uncompressed_block_size = 102400;
70 constexpr const U_I min_uncompressed_block_size = 100;
71
73
74} // end of namespace
75
76#endif
libdar::generic_file::generic_file
generic_file(gf_mode m)
main constructor
Definition generic_file.hpp:80
compression.hpp
compression parameters for API
generic_file.hpp
class generic_file is defined here as well as class fichier
libdar::compression
compression
the different compression algorithm available
Definition compression.hpp:46
infinint.hpp
switch module to limitint (32 ou 64 bits integers) or infinint
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47