26 #ifndef CAT_DELTA_SIGNATURE_HPP
27 #define CAT_DELTA_SIGNATURE_HPP
29 #include "../my_config.h"
165 void set_sig(
const std::shared_ptr<memory_file> & ptr, U_I sig_block_size);
201 void clear() { destroy(); init(); };
208 mutable std::shared_ptr<memory_file>
sig;
215 void init() noexcept;
218 void destroy() noexcept;
class archive_version that rules which archive format to follow
class archive_version manages the version of the archive format
the cat_delta_signature file class
bool pending_read
when the object has been created for read but data not yet read from archive
infinint delta_sig_size
size of the data to setup "sig" (set to zero when reading in sequential mode, sig is then setup on-fl...
void dump_metadata(generic_file &f) const
write down the delta_signature metadata for catalogue
bool get_patch_result_crc(const crc *&c) const
returns the CRC the file will have once restored or patched (for s_saved, s_delta,...
cat_delta_signature(const cat_delta_signature &ref)
copy constructor
bool has_patch_base_crc() const
returns whether the object has a base patch CRC (s_delta status objects)
void drop_sig() const
drop signature but keep metadata available
cat_delta_signature()
constructor to write an object to filesytem/backup (using dump_* methods later on)
cat_delta_signature & operator=(const cat_delta_signature &ref)
assignement operator
void read(bool sequential_read, const archive_version &ver)
void set_sig()
variante used when the delta_signature object will only contain CRCs (no delta signature)
bool get_patch_base_crc(const crc *&c) const
returns the CRC of the file to base the patch on, for s_delta objects
bool can_obtain_sig() const
the cat_delta_signature structure can only hold CRC without delta_signature, this call gives the situ...
void will_have_signature()
give the object where to fetch from the delta signature, object must exist up to the next call to dum...
void clear()
reset the object
U_I sig_block_len
block length used within delta signature
bool has_patch_result_crc() const
returns whether the object has a CRC corresponding to data (for s_saved, s_delta, and when delta sign...
cat_delta_signature(cat_delta_signature &&ref) noexcept
move constructor
void set_patch_base_crc(const crc &c)
set the reference CRC of the file to base the patch on, for s_detla objects
void set_patch_result_crc(const crc &c)
set the CRC the file will have once restored or patched (for s_saved, s_delta, and when delta signatu...
std::shared_ptr< memory_file > obtain_sig(const archive_version &ver) const
provide a memory_file object which the caller has the duty to destroy after use
void set_sig(const std::shared_ptr< memory_file > &ptr, U_I sig_block_size)
the object pointed to by ptr must stay available when calling dump_data()/dump_metadata() later on
void dump_data(generic_file &f, bool sequential_mode, const archive_version &ver) const
write down the data eventually with sequential read mark followed by delta sig metadata
crc * patch_base_check
associated CRC for the file this signature has been computed on, moved to cat_file since format 11....
bool is_pending_read() const
tells whether the read() call has been invoked
U_I obtain_sig_block_size() const
provide the block size used for delta signature
std::shared_ptr< memory_file > sig
the signature data, if set nullptr it will be fetched from f in direct access mode only
crc * patch_result_check
associated CRC
proto_compressor * zip
needed to disable compression when reading delta signature data from an archive
~cat_delta_signature()
destructor
generic_file * src
where to read data from
infinint delta_sig_offset
cat_delta_signature(generic_file *f, proto_compressor *c)
constructor to read an object (using read() later on) from filesystem/backup
pure virtual class defining interface of a CRC object
this is the interface class from which all other data transfer classes inherit
the arbitrary large positive integer class
class crc definition, used to handle Cyclic Redundancy Checks
Memory_file is a generic_file class that only uses virtual memory.
libdar namespace encapsulate all libdar symbols
abstracted ancestor class for compressor and parallel_compressor classes