26 #ifndef CAT_DELTA_SIGNATURE_HPP 27 #define CAT_DELTA_SIGNATURE_HPP 29 #include "../my_config.h" 125 void read(
bool sequential_read);
135 std::shared_ptr<memory_file>
obtain_sig()
const;
153 void set_sig(
const std::shared_ptr<memory_file> & ptr);
186 void clear() { destroy(); init(); };
192 mutable std::shared_ptr<memory_file>
sig;
197 void init() noexcept;
200 void destroy() noexcept;
201 void fetch_data() const;
crc * patch_base_check
associated CRC for the file this signature has been computed on
cat_delta_signature & operator=(const cat_delta_signature &ref)
assignement operator
std::shared_ptr< memory_file > sig
the signature data, if set nullptr it will be fetched from f in direct access mode only ...
bool has_patch_base_crc() const
returns whether the object has a base patch CRC (s_delta status objects)
class crc definition, used to handle Cyclic Redundancy Checks
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...
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 get_patch_result_crc(const crc *&c) const
returns the CRC the file will have once restored or patched (for s_saved, s_delta, and when delta signature is present)
void read(bool sequential_read)
void drop_sig() const
drop signature but keep metadata available
compressor * zip
needed to disable compression when reading delta signature data from an archive
generic_file * src
where to read data from
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...
crc * patch_result_check
associated CRC
infinint delta_sig_offset
where to read data from to setup "sig" (set to zero when read in sequential mode, sig is setup on-fly...
Memory_file is a generic_file class that only uses virtual memory.
the cat_delta_signature file class
void dump_metadata(generic_file &f) const
write down the delta_signature metadata for catalogue
std::shared_ptr< memory_file > obtain_sig() const
provide a memory_file object which the caller has the duty to destroy after use
compression class for gzip and bzip2 algorithms
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 will_have_signature()
give the object where to fetch from the delta signature, object must exist up to the next call to dum...
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...
cat_delta_signature(const cat_delta_signature &ref)
copy constructor
this is the interface class from which all other data transfer classes inherit
void set_sig()
variante used when the delta_signature object will only contain CRCs (no delta signature) ...
cat_delta_signature()
constructor to write an object to filesytem (using dump_* methods later on)
compression engine implementation
void dump_data(generic_file &f, bool sequential_mode) const
write down the data eventually with sequential read mark followed by delta sig metadata ...
~cat_delta_signature()
destructor
the arbitrary large positive integer class
pure virtual class defining interface of a CRC object
void clear()
reset the object
libdar namespace encapsulate all libdar symbols
cat_delta_signature(cat_delta_signature &&ref) noexcept
move constructor