![]() |
Disk ARchive 2.7.14
Full featured and portable backup and archiving tool
|
compression class for gzip and bzip2 algorithms More...
#include <compressor.hpp>
Inherits libdar::proto_compressor, and libdar::proto_compressor.
Protected Member Functions | |
virtual void | inherited_read_ahead (const infinint &amount) override |
tells the object that several calls to read() will follow to probably obtain at least the given amount of data | |
virtual U_I | inherited_read (char *a, U_I size) override |
implementation of read() operation | |
virtual void | inherited_write (const char *a, U_I size) override |
implementation of the write() operation | |
virtual void | inherited_truncate (const infinint &pos) override |
truncate file at the give offset | |
virtual void | inherited_sync_write () override |
write down any pending data | |
virtual void | inherited_flush_read () override |
reset internal engine, flush caches in order to read the data at current position | |
virtual void | inherited_terminate () override |
destructor-like call, except that it is allowed to throw exceptions | |
virtual void | inherited_read_ahead (const infinint &amount) override |
tells the object that several calls to read() will follow to probably obtain at least the given amount of data | |
virtual U_I | inherited_read (char *a, U_I size) override |
implementation of read() operation | |
virtual void | inherited_write (const char *a, U_I size) override |
implementation of the write() operation | |
virtual void | inherited_truncate (const infinint &pos) override |
truncate file at the give offset | |
virtual void | inherited_sync_write () override |
write down any pending data | |
virtual void | inherited_flush_read () override |
reset internal engine, flush caches in order to read the data at current position | |
virtual void | inherited_terminate () override |
destructor-like call, except that it is allowed to throw exceptions | |
Private Member Functions | |
void | flush_write () |
drop all pending write and reset compression engine | |
void | flush_write () |
drop all pending write and reset compression engine | |
Private Attributes | |
xfer * | compr |
datastructure for bzip2, gzip and zx compression (not use with compression::none | |
bool | read_mode |
read-only mode or write-only mode, read-write is write-only mode | |
generic_file * | compressed |
where to read from/write to compressed data | |
compression | algo |
compression algorithm used | |
bool | suspended |
whether compression is temporary suspended | |
compression class for gzip and bzip2 algorithms
Definition at line 44 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
libdar::compressor::compressor | ( | compression | x_algo, |
generic_file & | compressed_side, | ||
U_I | compression_level = 9 ) |
x_algo | only gzip, bzip2, xz and none are supported by this class |
compressed_side | where to read from/write to compressed data |
compression_level | compression level 1..9 |
|
delete |
libdar::compressor::compressor | ( | compression | x_algo, |
generic_file & | compressed_side, | ||
U_I | compression_level = 9 ) |
x_algo | only gzip, bzip2, xz and none are supported by this class |
compressed_side | where to read from/write to compressed data |
compression_level | compression level 1..9 |
|
delete |
get the current read/write position
Implements libdar::generic_file.
Definition at line 76 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
References compr, compressed, and libdar::generic_file::get_position().
get the current read/write position
Implements libdar::generic_file.
Definition at line 76 of file src/libdar/compressor.hpp.
References compr, compressed, and libdar::generic_file::get_position().
reset internal engine, flush caches in order to read the data at current position
Implements libdar::generic_file.
Referenced by skip(), skip_relative(), and skip_to_eof().
reset internal engine, flush caches in order to read the data at current position
Implements libdar::generic_file.
implementation of read() operation
[in,out] | a | where to put the data to read |
[in] | size | says how much data to read |
Implements libdar::generic_file.
implementation of read() operation
[in,out] | a | where to put the data to read |
[in] | size | says how much data to read |
Implements libdar::generic_file.
|
inlineoverrideprotectedvirtual |
tells the object that several calls to read() will follow to probably obtain at least the given amount of data
[in] | amount | is the maximum expected amount of data that is known to be read |
Implements libdar::generic_file.
Definition at line 79 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
References compressed, and libdar::generic_file::read_ahead().
|
inlineoverrideprotectedvirtual |
tells the object that several calls to read() will follow to probably obtain at least the given amount of data
[in] | amount | is the maximum expected amount of data that is known to be read |
Implements libdar::generic_file.
Definition at line 79 of file src/libdar/compressor.hpp.
References compressed, and libdar::generic_file::read_ahead().
write down any pending data
Implements libdar::generic_file.
Referenced by skip(), skip_relative(), and skip_to_eof().
write down any pending data
Implements libdar::generic_file.
destructor-like call, except that it is allowed to throw exceptions
Implements libdar::generic_file.
destructor-like call, except that it is allowed to throw exceptions
Implements libdar::generic_file.
|
overrideprotectedvirtual |
truncate file at the give offset
Implements libdar::generic_file.
|
overrideprotectedvirtual |
truncate file at the give offset
Implements libdar::generic_file.
|
overrideprotectedvirtual |
implementation of the write() operation
[in] | a | what data to write |
[in] | size | amount of data to write |
Implements libdar::generic_file.
|
overrideprotectedvirtual |
implementation of the write() operation
[in] | a | what data to write |
[in] | size | amount of data to write |
Implements libdar::generic_file.
Definition at line 66 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
Definition at line 66 of file src/libdar/compressor.hpp.
skip at the absolute position
[in] | pos | the offset in byte where next read/write operation must start |
Implements libdar::generic_file.
Definition at line 72 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
References compressed, inherited_flush_read(), inherited_sync_write(), and libdar::generic_file::skip().
skip at the absolute position
[in] | pos | the offset in byte where next read/write operation must start |
Implements libdar::generic_file.
Definition at line 72 of file src/libdar/compressor.hpp.
References compressed, inherited_flush_read(), inherited_sync_write(), and libdar::generic_file::skip().
skip relatively to the current position
Implements libdar::generic_file.
Definition at line 74 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
References compressed, inherited_flush_read(), inherited_sync_write(), and libdar::generic_file::skip_relative().
skip relatively to the current position
Implements libdar::generic_file.
Definition at line 74 of file src/libdar/compressor.hpp.
References compressed, inherited_flush_read(), inherited_sync_write(), and libdar::generic_file::skip_relative().
skip to the end of file
Implements libdar::generic_file.
Definition at line 73 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
References compressed, inherited_flush_read(), inherited_sync_write(), and libdar::generic_file::skip_to_eof().
skip to the end of file
Implements libdar::generic_file.
Definition at line 73 of file src/libdar/compressor.hpp.
References compressed, inherited_flush_read(), inherited_sync_write(), and libdar::generic_file::skip_to_eof().
|
inlineoverridevirtual |
whether the implementation is able to skip
Implements libdar::generic_file.
Definition at line 71 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
References compressed, and libdar::generic_file::skippable().
|
inlineoverridevirtual |
whether the implementation is able to skip
Implements libdar::generic_file.
Definition at line 71 of file src/libdar/compressor.hpp.
References compressed, and libdar::generic_file::skippable().
whether the implementation is able to truncate to the given position
Implements libdar::generic_file.
Definition at line 75 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
References compressed, and libdar::generic_file::truncatable().
whether the implementation is able to truncate to the given position
Implements libdar::generic_file.
Definition at line 75 of file src/libdar/compressor.hpp.
References compressed, and libdar::generic_file::truncatable().
|
private |
compression algorithm used
Definition at line 101 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
|
private |
datastructure for bzip2, gzip and zx compression (not use with compression::none
Definition at line 98 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
Referenced by get_position().
|
private |
where to read from/write to compressed data
Definition at line 100 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
Referenced by get_position(), inherited_read_ahead(), skip(), skip_relative(), skip_to_eof(), skippable(), and truncatable().
|
private |
read-only mode or write-only mode, read-write is write-only mode
Definition at line 99 of file dar64-2.7.14-win64/include/dar/compressor.hpp.
|
private |
whether compression is temporary suspended
Definition at line 102 of file dar64-2.7.14-win64/include/dar/compressor.hpp.