Disk ARchive
2.7.15
Full featured and portable backup and archiving tool
|
compression class for zstd algorithms More...
#include <compressor_zstd.hpp>
Inherits libdar::proto_compressor.
Public Member Functions | |
compressor_zstd (generic_file &compressed_side, U_I compression_level=9) | |
compressor_zstd (const compressor_zstd &ref)=delete | |
compressor_zstd (compressor_zstd &&ref) noexcept=delete | |
compressor_zstd & | operator= (const compressor_zstd &ref)=delete |
compressor_zstd & | operator= (compressor_zstd &&ref) noexcept=delete |
virtual compression | get_algo () const override |
virtual void | suspend_compression () override |
virtual void | resume_compression () override |
virtual bool | is_compression_suspended () const override |
virtual bool | skippable (skippability direction, const infinint &amount) override |
whether the implementation is able to skip More... | |
virtual bool | skip (const infinint &pos) override |
skip at the absolute position More... | |
virtual bool | skip_to_eof () override |
skip to the end of file | |
virtual bool | skip_relative (S_I x) override |
skip relatively to the current position | |
virtual bool | truncatable (const infinint &pos) const override |
whether the implementation is able to truncate to the given position | |
virtual infinint | get_position () const override |
get the current read/write position | |
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 More... | |
virtual U_I | inherited_read (char *a, U_I size) override |
implementation of read() operation More... | |
virtual void | inherited_write (const char *a, U_I size) override |
implementation of the write() operation More... | |
virtual void | inherited_truncate (const infinint &pos) override |
truncate file at the give offset More... | |
virtual void | inherited_sync_write () override |
write down any pending data More... | |
virtual void | inherited_flush_read () override |
reset internal engine, flush caches in order to read the data at current position More... | |
virtual void | inherited_terminate () override |
destructor-like call, except that it is allowed to throw exceptions More... | |
Private Member Functions | |
void | reset_compr_engine () |
reset the compression engine ready for use | |
void | compr_flush_write () |
void | compr_flush_read () |
void | clean_read () |
void | clean_write () |
void | clear_inbuf () |
from zstd | |
void | clear_outbuf () |
void | release_mem () |
void | setup_context (U_I compression_level) |
Private Attributes | |
generic_file * | compressed |
bool | suspended |
compression class for zstd algorithms
Definition at line 49 of file compressor_zstd.hpp.
|
inlineoverrideprotectedvirtual |
reset internal engine, flush caches in order to read the data at current position
Implements libdar::generic_file.
Definition at line 83 of file compressor_zstd.hpp.
|
overrideprotectedvirtual |
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 78 of file compressor_zstd.hpp.
References libdar::generic_file::read_ahead().
|
inlineoverrideprotectedvirtual |
write down any pending data
Implements libdar::generic_file.
Definition at line 82 of file compressor_zstd.hpp.
|
overrideprotectedvirtual |
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 |
implementation of the write() operation
[in] | a | what data to write |
[in] | size | amount of data to write |
Implements libdar::generic_file.
|
inlineoverridevirtual |
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 71 of file compressor_zstd.hpp.
References libdar::generic_file::skip().
|
inlineoverridevirtual |
whether the implementation is able to skip
Implements libdar::generic_file.
Definition at line 70 of file compressor_zstd.hpp.
References libdar::generic_file::skippable().