|
Disk ARchive
2.4.12
|
compression class for gzip and bzip2 algorithms More...
#include <compressor.hpp>
Inherits libdar::generic_file.
Public Member Functions | |
| compressor (compression algo, generic_file &compressed_side, U_I compression_level=9) | |
| compressor (compression algo, generic_file *compressed_side, U_I compression_level=9) | |
| void | flush_write () |
| void | flush_read () |
| void | clean_read () |
| void | clean_write () |
| compression | get_algo () const |
| void | change_algo (compression new_algo, U_I new_compression_level) |
| changes compression algorithm used by the compressor | |
| void | change_algo (compression new_algo) |
| changes the compression algorithm keeping the same compression level | |
| bool | skip (const infinint &pos) |
| skip at the absolute position | |
| bool | skip_to_eof () |
| skip to the end of file | |
| bool | skip_relative (S_I x) |
| skip relatively to the current position | |
| infinint | get_position () |
| get the current read/write position | |
Protected Member Functions | |
| U_I | inherited_read (char *a, U_I size) |
| implementation of read() operation | |
| void | inherited_write (const char *a, U_I size) |
| implementation of the write() operation | |
| void | inherited_sync_write () |
| write down any pending data | |
| void | inherited_terminate () |
| destructor-like call, except that it is allowed to throw exceptions | |
compression class for gzip and bzip2 algorithms
Definition at line 60 of file compressor.hpp.
| void libdar::compressor::change_algo | ( | compression | new_algo, |
| U_I | new_compression_level | ||
| ) |
changes compression algorithm used by the compressor
| [in] | new_algo | defines the new algorithm to use |
| [in] | new_compression_level | defines the new compression level to use. |
Referenced by change_algo().
| U_I libdar::compressor::inherited_read | ( | char * | a, |
| U_I | size | ||
| ) | [inline, protected, virtual] |
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.
Definition at line 103 of file compressor.hpp.
| void libdar::compressor::inherited_sync_write | ( | ) | [inline, protected, virtual] |
write down any pending data
Implements libdar::generic_file.
Definition at line 105 of file compressor.hpp.
| void libdar::compressor::inherited_terminate | ( | ) | [inline, protected, virtual] |
destructor-like call, except that it is allowed to throw exceptions
Implements libdar::generic_file.
Definition at line 106 of file compressor.hpp.
| void libdar::compressor::inherited_write | ( | const char * | a, |
| U_I | size | ||
| ) | [inline, protected, virtual] |
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 104 of file compressor.hpp.
| bool libdar::compressor::skip | ( | const infinint & | pos | ) | [inline, virtual] |
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 97 of file compressor.hpp.
References libdar::generic_file::skip().
1.7.6.1