26 #ifndef COMPRESSOR_ZSTD_HPP
27 #define COMPRESSOR_ZSTD_HPP
29 #include "../my_config.h"
64 virtual void suspend_compression()
override;
65 virtual void resume_compression()
override;
66 virtual bool is_compression_suspended()
const override {
return suspended; };
71 virtual bool skip(
const infinint & pos)
override { compr_flush_write(); compr_flush_read(); clean_read();
return compressed->
skip(pos); };
72 virtual bool skip_to_eof()
override { compr_flush_write(); compr_flush_read(); clean_read();
return compressed->
skip_to_eof(); };
73 virtual bool skip_relative(S_I x)
override { compr_flush_write(); compr_flush_read(); clean_read();
return compressed->
skip_relative(x); };
95 ZSTD_outBuffer outbuf;
97 U_I below_tampon_size;
98 U_I above_tampon_size;
108 void compr_flush_write();
110 void compr_flush_read();
120 void setup_context(U_I compression_level);
compression class for zstd algorithms
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 amoun...
void reset_compr_engine()
reset the compression engine ready for use
virtual U_I inherited_read(char *a, U_I size) override
implementation of read() operation
virtual void inherited_flush_read() override
reset internal engine, flush caches in order to read the data at current position
virtual bool skippable(skippability direction, const infinint &amount) override
whether the implementation is able to skip
virtual bool skip_to_eof() override
skip to the end of file
virtual bool skip(const infinint &pos) override
skip at the absolute position
virtual void inherited_write(const char *a, U_I size) override
implementation of the write() operation
void clear_inbuf()
from zstd
virtual bool skip_relative(S_I x) override
skip relatively to the current position
virtual void inherited_terminate() override
destructor-like call, except that it is allowed to throw exceptions
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 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
this is the interface class from which all other data transfer classes inherit
virtual bool truncatable(const infinint &pos) const =0
whether the implementation is able to truncate to the given position
virtual bool skip(const infinint &pos)=0
skip at the absolute position
virtual bool skippable(skippability direction, const infinint &amount)=0
whether the implementation is able to skip
void read_ahead(const infinint &amount)
virtual infinint get_position() const =0
get the current read/write position
virtual bool skip_relative(S_I x)=0
skip relatively to the current position
virtual bool skip_to_eof()=0
skip to the end of file
the arbitrary large positive integer class
compression
the different compression algorithm available
libdar namespace encapsulate all libdar symbols
abstracted ancestor class for compressor and parallel_compressor classes