 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
26 #ifndef CAT_DELTA_SIGNATURE_HPP
27 #define CAT_DELTA_SIGNATURE_HPP
29 #include "../my_config.h"
160 void set_sig(
const std::shared_ptr<memory_file> & ptr, U_I sig_block_size);
196 void clear() { destroy(); init(); };
202 mutable std::shared_ptr<memory_file>
sig;
209 void init() noexcept;
212 void destroy() noexcept;
cat_delta_signature()
constructor to write an object to filesytem (using dump_* methods later on)
void drop_sig() const
drop signature but keep metadata available
class crc definition, used to handle Cyclic Redundancy Checks
infinint delta_sig_offset
compression class for gzip and bzip2 algorithms
the arbitrary large positive integer class
class archive_version that rules which archive format to follow
crc * patch_result_check
associated CRC
crc * patch_base_check
associated CRC for the file this signature has been computed on
bool has_patch_base_crc() const
returns whether the object has a base patch CRC (s_delta status objects)
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,...
generic_file * src
where to read data from
U_I sig_block_len
block lenght used within delta signature
class archive_version manages the version of the archive format
U_I obtain_sig_block_size() const
provide the block size used for delta signature
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...
pure virtual class defining interface of a CRC object
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...
bool can_obtain_sig() const
the cat_delta_signature structure can only hold CRC without delta_signature, this call gives the situ...
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
std::shared_ptr< memory_file > sig
the signature data, if set nullptr it will be fetched from f in direct access mode only
compressor * zip
needed to disable compression when reading delta signature data from an archive
void read(bool sequential_read, const archive_version &ver)
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 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
void clear()
reset the object
Memory_file is a generic_file class that only uses virtual memory.
this is the interface class from which all other data transfer classes inherit
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...
void dump_metadata(generic_file &f) const
write down the delta_signature metadata for catalogue
~cat_delta_signature()
destructor
cat_delta_signature(const cat_delta_signature &ref)
copy constructor
the cat_delta_signature file class
void set_sig()
variante used when the delta_signature object will only contain CRCs (no delta signature)
cat_delta_signature & operator=(const cat_delta_signature &ref)
assignement operator
void will_have_signature()
give the object where to fetch from the delta signature, object must exist up to the next call to dum...
bool get_patch_base_crc(const crc *&c) const
returns the CRC of the file to base the patch on, for s_delta objects
compression engine implementation
libdar namespace encapsulate all libdar symbols