| Disk ARchive 2.7.18 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
libdar Namespace Reference
API

libdar namespace encapsulate all libdar symbols More...

## Namespaces
namespace | compile_time
| nested namespace inside libdar

## Classes
class | archive
| the archive class realizes the most general operations on archives More...
class | archive_num
| class archive_num stores the position of an archive inside a dar_manager database More...
class | archive_options_create
| class holding optional parameters used to create an archive More...
class | archive_options_extract
| class holding optional parameters used to extract files from an existing archive More...
class | archive_options_isolate
| class holding optional parameters used to isolate an existing archive More...
class | archive_options_listing
| class holding optional parameters used to list the contents of an existing archive More...
class | archive_options_listing_shell
| class holding optional shell specific parameters used to list the contents of an existing archive More...
class | archive_options_merge
| class holding optional parameters used to proceed to the merge operation More...
class | archive_options_read
| class holding optional parameters used to read an existing archive More...
class | archive_options_repair
| class holding optional parameters used to create an archive More...
class | archive_options_test
| class holding optional parameters used to test the structure coherence of an existing archive More...
class | archive_summary
| the archive_summary class provides information about a given archive More...
class | archive_version
| class archive_version manages the version of the archive format More...
class | bool_mask
| boolean mask, either always true or false More...
class | cache
| the cache class implements a fixed length read/write caching mechanism More...
class | cache_global
| the cache_global cache is an adaptation of the cache class to the fichier_global interface More...
class | candidates
| helper class for data_tree More...
class | cat_blockdev
| the block device class More...
class | cat_chardev
| the char device class More...
class | cat_delta_signature
| the cat_delta_signature file class More...
class | cat_detruit
| the deleted file entry More...
class | cat_device
| the special cat_device root class More...
class | cat_directory
| the cat_directory inode class More...
class | cat_door
| the class for Door IPC (mainly for Solaris) More...
class | cat_entree
| the root class from all other inherite for any entry in the catalogue More...
class | cat_eod
| the End of Directory entry class More...
class | cat_etoile
| the hard link implementation More...
class | cat_file
| the plain file class More...
class | cat_ignored
| the present file to ignore (not to be recorded as deleted later) More...
class | cat_ignored_dir
| the ignored cat_directory class, to be promoted later as empty cat_directory if needed More...
class | cat_inode
| the root class for all cat_inode More...
class | cat_lien
| the symbolic link inode class More...
class | cat_mirage
| the hard link implementation, cat_mirage is the named entry owned by a directory it points to a common "cat_etoile class" More...
class | cat_nomme
| the base class for all entry that have a name More...
class | cat_prise
| the Unix socket inode class More...
class | cat_signature
| class cat_signature combines the cat_entree::signature() of the object with its saved_status and read and store this combinason More...
class | cat_tube
| the named pipe class More...
class | catalogue
| the catalogue class which gather all objects contained in a give archive More...
struct | compress_block_header
| block header structure used for storing compressed blocks More...
class | compressor
| compression class for gzip and bzip2 algorithms More...
class | compressor_zstd
| compression class for zstd algorithms More...
class | contextual
| the contextual class adds the information of phases in the generic_file More...
class | crc
| pure virtual class defining interface of a CRC object More...
class | crc_i
| crc implementation based on infinint More...
class | crc_n
| crc implementation based on U_I More...
class | crit_action
| the global action for overwriting More...
class | crit_and
| realises the AND operator More...
class | crit_chain
| the crit_chain class sequences crit_actions up to full definition of the action More...
class | crit_constant_action
| the basic constant action More...
class | crit_in_place_data_bigger
| returns true if the data of the first entry is bigger or equal to the one of the second entry More...
class | crit_in_place_data_dirty
| return true if the entry is a dirty file (or hard linked dirty file) More...
class | crit_in_place_data_more_recent
| returns true if the data of the first entry is more recent or of the same date of the one of the second entry More...
class | crit_in_place_data_more_recent_or_equal_to
| If the in_place entry is not an inode its date is considered equal to zero. Comparison is done on mtime. More...
class | crit_in_place_data_saved
| if the entry is not an inode the result is also true More...
class | crit_in_place_data_sparse
| return true if the entry is a sparse file (or hard linked sparse file) More...
class | crit_in_place_EA_bigger
| returns true if the space used by EA of the first entry is greater or equal to the space used by the EA of the second entry (no EA means 0 byte for EA storage) More...
class | crit_in_place_EA_more_recent
| returns true if the EA of the first entry is more recent or equal to the one of the second entry More...
class | crit_in_place_EA_more_recent_or_equal_to
| returns true if the EA of the first entry is more recent or equal to the fixed date given in argument to the constructor More...
class | crit_in_place_EA_present
class | crit_in_place_EA_saved
| returns true if the in place entry has its EA saved (not just marked as saved) in the archve of reference More...
class | crit_in_place_has_delta_sig
| return true if the entry has delta signature More...
class | crit_in_place_is_dir
| returns true if the first entry is a cat_directory (whatever is the second) More...
class | crit_in_place_is_file
| returns true if the first entry is a plain file (whatever is the second) More...
class | crit_in_place_is_hardlinked_inode
| returns true if the first entry is a inode with several hard links (whatever is the second entry) More...
class | crit_in_place_is_inode
| returns true if the first entry is an inode (whatever is the second) More...
class | crit_in_place_is_new_hardlinked_inode
class | crit_in_place_more_EA
| returns true if the first entry has more or even EA (in number not in size) than the second entry More...
class | crit_not
| realises the negation of the criterium given in argument to its constructor More...
class | crit_same_inode_data
| returns true if both inputs are inode of the same type (file/pipe/device/...) and share inode information More...
class | crit_same_type
| returns true if the two entries are of the same type (plain-file/char dev/block dev/named pipe/symlink/directory/unix socket) More...
class | criterium
| the generic criterium class, parent of all criterium More...
class | crypto_asym
| asymetric ciphering More...
class | crypto_sym
| symetrical strong encryption, interface to grypt library More...
class | data_dir
| the data_dir class inherits from data_tree and holds the directory tree's parent relationship More...
class | data_tree
| the data_tree class stores presence of a given file in a set of archives More...
class | database
| the database class defines the dar_manager database More...
class | database_add_options
| options to add an archive to base More...
class | database_archives
| datastructure managing a member of the list of archives used by a database More...
class | database_change_basename_options
| options for changing a given archive's basename More...
class | database_change_path_options
| options for changing a given archive's path More...
class | database_dump_options
| options to write a database to file More...
class | database_open_options
| options to open a database More...
class | database_remove_options
| options to remove an archive from the base More...
class | database_restore_options
| options for restoration from database More...
class | database_used_options
| options for file "used" in archive More...
class | datetime
| stores time information More...
class | deci
| decimal class, convert infinint from and to decimal represention More...
class | defile
| the defile class keep trace of the real path of files while the flow in the filter routines More...
struct | delta_sig_block_size
| defines how to calculate delta signature block size based of file size to delta sign More...
class | ea_attributs
| the class ea_attributs manages the set of EA that can be associated to an inode More...
class | Ebug
| exception used to signal a bug. A bug is triggered when reaching some code that should never be reached More...
class | Ecompilation
| exception used when a requested fearture has not beed activated at compilation time More...
class | Edata
| exception used when an error concerning the treated data has been met More...
class | Edeci
| exception used to signal convertion problem between infinint and string (decimal representation) More...
class | Efeature
| exception used when a requested feature is not (yet) implemented More...
class | Egeneric
| this is the parent class of all exception classes. More...
class | Ehardware
| exception used when hardware problem is found More...
class | Einfinint
| exception used when arithmetic error is detected when operating on infinint More...
class | elastic
| the elastic buffer class More...
class | Elibcall
| exception used to signal an error in the argument given to libdar call of the API More...
class | Elimitint
| exception used when a limitint overflow is detected, the maximum value of the limitint has been exceeded More...
class | Ememory
| exception used when memory has been exhausted More...
class | Enet_auth
| exception used to report authentication error More...
struct | entree_stats
| holds the statistics contents of a catalogue More...
class | entrepot
| the Entrepot interface More...
class | entrepot_libcurl
| for managing archive into a remote repository More...
class | entrepot_local
class | Erange
| exception used to signal range error More...
class | Escript
| exception used when error the inter-slice user command returned an error code More...
class | Esecu_memory
| exception used when secure memory has been exhausted More...
class | Esystem
| exception used to carry system error More...
class | et_mask
| makes an AND operator between two or more masks More...
struct | etage
| the etage structure keep trace of directory contents More...
class | Ethread_cancel
| exception used when the thread libdar is running in is asked to stop More...
class | Ethread_cancel_with_attr
| Ethread_cancel with infinint attribute. More...
class | Euser_abort
| exception used to signal that the user has aborted the operation More...
class | exclude_dir_mask
| matches if string is the given constructor string or a sub directory of it More...
class | fichier_global
| abstraction of filesystem files for entrepot More...
class | fichier_local
| filesystem local files More...
class | filesystem_backup
| makes a flow sequence of inode to feed the backup filtering routing More...
class | filesystem_diff
| make a flow of inode to feed the difference filter routine More...
class | filesystem_hard_link_read
| keep trace of hard links when reading the filesystem More...
class | filesystem_hard_link_write
| keep trace of already written inodes to restore hard links More...
class | filesystem_restore
| receive the flow of inode from the restoration filtering routing and promotes these to real filesystem objects More...
class | filesystem_specific_attribute
| Filesystem Specific Attributes (FSA) class. More...
class | filesystem_specific_attribute_list
| interface to fileystem for FSA More...
class | fsa_infinint
| fsa based on integer More...
class | fsa_time
| fsa based on time More...
class | generic_file
| this is the interface class from which all other data transfer classes inherit More...
class | generic_file_overlay_for_gpgme
| generic_file interface for for gpgme More...
class | generic_rsync
| generic_file interface to librsync More...
class | generic_to_global_file
| provides a fichier_global interface for any type of generic_file More...
class | hash_fichier
| manages the generation of a hash More...
class | header
| this class manages the header of each slice More...
class | header_flags
| manages the flag field used for now in the archive header More...
class | header_version
| manages the archive header and trailer More...
class | heap
| the class heap is nothing related to the common heap datastructure this is just a "heap" in the sense of a pool of preallocated objects More...
class | infinint
| the arbitrary large positive integer class More...
class | label
| manage label data structure used in archive slice headers More...
class | libdar_slave
| class implementing the dar_slave feature More...
class | libdar_xform
| class implementing the dar_xform feature More...
class | limitint
class | list_entry
class | mask
| the generic class, parent of all masks More...
class | mask_list
| the mask_list class, matches string that are present in a given file More...
class | mem_ui
| class mem_ui to keep a copy of a user_interaction object More...
class | memory_file
| generic_file stored in memory More...
class | mycurl_param_element
| the implemented inherited classes of the abstracted class for etherogeneous list/map More...
class | mycurl_param_element_generic
| the ancestor class of etherogeneous list/map More...
class | mycurl_param_list
class | not_mask
| negation of another mask More...
class | null_file
| the null_file class implements the /dev/null behavior More...
class | ou_mask
| makes the OR operator between two or more masks More...
class | parallel_tronconneuse
| this is a partial implementation of the generic_file interface to cypher/decypher data block by block. More...
class | path
| the class path is here to manipulate paths in the Unix notation: using'/' More...
class | pile
| stores a stack of generic_files writing/reading on each others More...
class | proto_generic_file
| ancestor class of generic_file More...
class | range
| stores a range of integers or a set of ranges More...
class | regular_mask
| matches regular expressions (see "man 7 regex") More...
class | same_path_mask
| matches if string is exactly the given mask (no wilde card expression) More...
class | sar
| Sar class stands for Segmentation And Reassembly class. More...
class | scrambler
| scrambler is a very weak encryption scheme More...
class | secu_string
| class secu_string More...
class | semaphore
| class semaphore More...
struct | signator
| signator status More...
class | simple_mask
| matches as done on shell command lines (see "man 7 glob") More...
class | simple_path_mask
| string matches if it is subdir of mask or mask is a subdir of expression More...
class | slave_zapette
| this class answers to order given by a zapette object More...
class | smart_node
| class which holds the address of the allocated memory for many smart_pointers More...
class | smart_pointer
| smart pointer class to be used to automagically manage multiple time pointed to address More...
class | statistics
| class used by libdar::archive class to give a summary of treated file during and after an operation More...
class | storage
| arbitrary large storage structure More...
class | terminateur
| terminateur class indicates the location of the beginning of the catalogue More...
class | testing
| the testing class binds criterium to actions More...
class | thread_cancellation
| class to be used as parent to provide checkpoints to inherited classes More...
class | tlv
class | trivial_sar
class | tronc
| makes a segment of a generic_file appear like a real generic_file More...
class | tronconneuse
| this is a partial implementation of the generic_file interface to cypher/decypher data block by block. More...
class | trontextual
| trontextual class is a contextual class tronc, that's all. More...
class | tuyau
| pipe implementation under the generic_file interface. More...
class | tuyau_global
| the tuyau_global provides skip()/get_position() features on top of pipe-like object More...
class | user_interaction
| This is a pure virtual class that is used by libdar when interaction with the user is required. More...
class | user_interaction_blind
| full implementation class for user_interaction, which shows nothing and assumes answer "no" to any question More...
class | user_interaction_callback
| full implemented class for user_interaction based on callback functions. More...
class | wrapperlib
| this class encapsulates calls to libz or libbz2 More...
class | zapette
| zapette emulate a file that is remotely controlled by slave_zapette More...

## Typedefs
using | archive_listing_callback
| callback function type expected for archive::op_listing and archive::get_children_of()
using | database_archives_list = std::deque<database_archives>
| list of archives found in a database
using | database_listing_show_files_callback
| called by the database::get_files() routine
using | database_listing_get_version_callback
| called with the information of presence for an entry in archive number num
using | database_listing_statistics_callback
| called with teh information of statistics for each archive in turn
using | fsa_scope = std::set<fsa_family>
| set of fsa families
using | magic_number = U_32
using | int_tools_bitfield = unsigned char[8]
typedef infinint(* | trailing_clear_data_callback) (generic_file &below, const archive_version &reading_ver)
| the trailing_clear_data_callback call back is a mean by which the upper layer cat tell when encrypted data ends

## Enumerations
enum class | modified_data_detection { modified_data_detection::any_inode_change , modified_data_detection::mtime_size }
| how to detect data has changed when some fields More...
enum class | comparison_fields { comparison_fields::all , comparison_fields::ignore_owner , comparison_fields::mtime , comparison_fields::inode_type }
| how to consider file change during comparison and incremental backup More...
enum class | hash_algo { hash_algo::none , hash_algo::md5 , hash_algo::sha1 , hash_algo::sha512 , hash_algo::argon2 }
| hashing algorithm available More...
enum | capa_status { capa_set , capa_clear , capa_unknown }
| the EFFECTIVE set the value of the associated capability for the calling thread More...
enum class | saved_status { saved_status::saved , saved_status::inode_only , saved_status::fake , saved_status::not_saved , saved_status::delta }
| data saved status for an entry More...
enum class | ea_saved_status { ea_saved_status::none , ea_saved_status::partial , ea_saved_status::fake , ea_saved_status::full , ea_saved_status::removed }
| EA saved status for an entry. More...
enum class | fsa_saved_status { fsa_saved_status::none , fsa_saved_status::partial , fsa_saved_status::full }
| FSA saved status for an entry. More...
enum class | compression { compression::none = 'n' , compression::gzip = 'z' , compression::bzip2 = 'y' , compression::lzo = 'l' , compression::xz = 'x' , compression::lzo1x_1_15 = 'j' , compression::lzo1x_1 = 'k' , compression::zstd = 'd' , compression::lz4 = 'q' }
| the different compression algorithm available More...
enum | over_action_data { data_preserve , data_overwrite , data_preserve_mark_already_saved , data_overwrite_mark_already_saved , data_remove , data_undefined , data_ask }
| the possible actions for overwriting data More...
enum | over_action_ea { EA_preserve , EA_overwrite , EA_clear , EA_preserve_mark_already_saved , EA_overwrite_mark_already_saved , EA_merge_preserve , EA_merge_overwrite , EA_undefined , EA_ask }
| the possible action for overwriting EA More...
enum class | crypto_algo { crypto_algo::none , crypto_algo::scrambling , crypto_algo::blowfish , crypto_algo::aes256 , crypto_algo::twofish256 , crypto_algo::serpent256 , crypto_algo::camellia256 }
| the different cypher available for encryption (strong or weak) More...
enum class | db_lookup { db_lookup::found_present , db_lookup::found_removed , db_lookup::not_found , db_lookup::not_restorable }
| the available status of a lookup More...
enum class | db_etat { db_etat::et_saved , db_etat::et_patch , db_etat::et_patch_unusable , db_etat::et_inode , db_etat::et_present , db_etat::et_removed , db_etat::et_absent }
| the status for a founded entry More...
enum | elastic_direction { elastic_forward , elastic_backward }
| reading direction of an elastic buffer More...
enum | fsa_family { fsaf_hfs_plus , fsaf_linux_extX }
| FSA family. More...
enum | fsa_nature { fsan_unset , fsan_creation_date , fsan_append_only , fsan_compressed , fsan_no_dump , fsan_immutable , fsan_data_journaling , fsan_secure_deletion , fsan_no_tail_merging , fsan_undeletable , fsan_noatime_update , fsan_synchronous_directory , fsan_synchronous_update , fsan_top_of_dir_hierarchy }
| FSA nature. More...
enum | gf_mode { gf_read_only , gf_write_only , gf_read_write }
| generic_file openning modes More...
enum | flag_type { flag_type_terminal = 'T' , flag_type_non_terminal = 'N' , flag_type_located_at_end_of_slice = 'E' }
enum | mycurl_protocol { proto_ftp , proto_sftp }
| libcurl protocols supported by libdar More...
enum class | compressor_block_flags { data = 0 , eof_die = 1 , error = 2 , worker_error = 3 }
| the different flags used to communicate between threads hold by parallel_block_compressor class More...
enum class | tronco_flags { normal = 0 , stop = 1 , eof = 2 , die = 3 , data_error = 4 , exception_below = 5 , exception_worker = 6 , exception_error = 7 }
| status flags used between parallel_tronconneuse and its sub-threads More...
enum | wrapperlib_mode { zlib_mode , bzlib_mode , xz_mode }

## Functions
std::string | hash_algo_to_string (hash_algo algo)
| convert hash value to human readable string
bool | string_to_hash_algo (const std::string &arg, hash_algo &val)
| convert string to hash algorithm
U_I | hash_algo_to_gcrypt_hash (hash_algo algo)
| convert hash value to libgcrypt hash value
unsigned char | hash_algo_to_char (hash_algo algo)
| convert hash value to char value
hash_algo | char_to_hash_algo (unsigned char arg)
| convert char to hash_algo
const archive_version | empty_archive_version ()
capa_status | capability_LINUX_IMMUTABLE (user_interaction &ui, bool verbose)
capa_status | capability_SYS_RESOURCE (user_interaction &ui, bool verbose)
capa_status | capability_FOWNER (user_interaction &ui, bool verbose)
capa_status | capability_CHOWN (user_interaction &ui, bool verbose)
const char * | cat_entree_signature2string (unsigned char sign)
| convert a signature char to a human readable string
compression | char2compression (char a)
| convert a char as stored in archive to its compression value
bool | char2compression_mode (char a)
char | compression2char (compression c, bool per_block=false)
| convert a compression value to a char for storing in archive
std::string | compression2string (compression c)
| convert a compression to its string representation
compression | string2compression (const std::string &a)
| convert a string representing a compression algorithm to its enum compression value
crc * | create_crc_from_file (proto_generic_file &f, bool old=false)
| generate a CRC object reading it from file
crc * | create_crc_from_size (infinint width)
| generate a CRC object with adhoc width based on a file size
std::string | crypto_algo_2_string (crypto_algo algo)
| convert crypto algo to readable std::string
char | crypto_algo_2_char (crypto_algo a)
| convert crypto algo to char
crypto_algo | char_2_crypto_algo (char a)
| convert char to crypto algo
bool | same_signatories (const std::list< signator > &a, const std::list< signator > &b)
| return whether the two signators lists match
bool | crypto_min_ver_libgcrypt_no_bug ()
generic_file * | database_header_create (const std::shared_ptr< user_interaction > &dialog, const std::string &filename, bool overwrite, compression algozip, U_I compr_level)
| create the header for a dar_manager database
generic_file * | database_header_open (const std::shared_ptr< user_interaction > &dialog, const std::string &filename, unsigned char &db_version, compression &algozip, U_I &compr_level)
| read the header of a dar_manager database
const unsigned char | database_header_get_supported_version ()
archive_version | db2archive_version (unsigned char db_version)
| converts dar_manager database version to dar archive version in order to properly read time fields
std::ostream & | operator<< (std::ostream &ref, const infinint &arg)
| specific << operator to use infinint in std::ostream
ea_attributs * | ea_filesystem_read_ea (const std::string &chemin, const mask &filter)
| read EA associated to a given file
bool | ea_filesystem_write_ea (const std::string &chemin, const ea_attributs &val, const mask &filter)
| overwrite some attribute to a given file's attribute list
void | ea_filesystem_clear_ea (const std::string &name, const mask &filter)
| remove all EA of a given file that match a given mask
bool | ea_filesystem_has_ea (const std::string &name)
| test the presence of EA for a given file
bool | ea_filesystem_has_ea (const std::string &name, const mask &filter)
| test the presence of EA for a given file
const char * | dar_gettext (const char *)
| a routine to change NLS domaine forth and back for inline routines
template<class T >
T * | cloner (const T *x)
bool | filesystem_tools_has_immutable (const cat_inode &arg)
void | filesystem_tools_set_immutable (const std::string &target, bool val, user_interaction &ui)
void | filesystem_tools_supprime (user_interaction &ui, const std::string &ref)
void | filesystem_tools_widen_perm (user_interaction &dialog, const cat_inode &ref, const std::string &chem, comparison_fields what_to_check)
void | filesystem_tools_make_owner_perm (user_interaction &dialog, const cat_inode &ref, const std::string &chem, comparison_fields what_to_check, const fsa_scope &scope)
void | filesystem_tools_make_date (const cat_inode &ref, const std::string &chem, comparison_fields what_to_check, const fsa_scope &scope)
void | filesystem_tools_attach_ea (const std::string &chemin, cat_inode *ino, const mask &ea_mask)
bool | filesystem_tools_is_nodump_flag_set (user_interaction &dialog, const path &chem, const std::string &filename, bool info)
path * | filesystem_tools_get_root_with_symlink (user_interaction &dialog, const path &root, bool info_details)
mode_t | filesystem_tools_get_file_permission (const std::string &path)
void | filesystem_tools_make_delta_patch (const std::shared_ptr< user_interaction > &dialog, const cat_file &existing, const std::string &existing_pathname, const cat_file &patcher, const path &directory)
fichier_local * | filesystem_tools_create_non_existing_file_based_on (const std::shared_ptr< user_interaction > &dialog, std::string filename, path where, std::string &new_filename)
| create in dirname a brand-new filename which name derives from filename
void | filesystem_tools_copy_content_from_to (const std::shared_ptr< user_interaction > &dialog, const std::string &source_path, const std::string &destination_path, const crc *expected_crc)
bool | filesystem_tools_read_linux_birthtime (const std::string &target, datetime &val)
| read the birthtime of target inode
void | filtre_restore (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, const catalogue &cat, const path &fs_racine, bool fs_warn_overwrite, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, statistics &st, const mask &ea_mask, bool flat, comparison_fields what_to_check, bool warn_remove_no_match, bool empty, bool empty_dir, const crit_action &x_overwrite, archive_options_extract::t_dirty dirty, bool only_deleted, bool not_deleted, const fsa_scope &scope, bool ignore_unix_sockets)
void | filtre_sauvegarde (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, const pile_descriptor &pdesc, catalogue &cat, const catalogue &ref, const path &fs_racine, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, bool display_finished, statistics &st, bool make_empty_dir, const mask &ea_mask, const mask &compr_mask, const infinint &min_compr_size, bool nodump, const infinint &hourshift, bool alter_time, bool furtive_read_mode, const filesystem_ids &same_fs, comparison_fields what_to_check, bool snapshot, bool cache_directory_tagging, bool security_check, const infinint &repeat_count, const infinint &repeat_byte, const infinint &fixed_date, const infinint &sparse_file_min_size, const std::string &backup_hook_file_execute, const mask &backup_hook_file_mask, bool ignore_unknown, const fsa_scope &scope, const std::string &exclude_by_ea, bool delta_signature, const infinint &delta_sig_min_size, const mask &delta_mask, bool delta_diff, bool auto_zeroing_neg_dates, const std::set< std::string > &ignored_symlinks, modified_data_detection mod_data_detect, const delta_sig_block_size &delta_sig_block_len)
void | filtre_difference (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, const catalogue &cat, const path &fs_racine, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, statistics &st, const mask &ea_mask, bool alter_time, bool furtive_read_mode, comparison_fields what_to_check, const infinint &hourshift, bool compare_symlink_date, const fsa_scope &scope, bool isolated_mode)
void | filtre_test (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, const catalogue &cat, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, bool empty, statistics &st)
void | filtre_merge (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, const pile_descriptor &pdesc, catalogue &cat, const catalogue *ref1, const catalogue *ref2, bool info_details, bool display_treated, bool display_treated_only_dir, bool display_skipped, statistics &st, bool make_empty_dir, const mask &ea_mask, const mask &compr_mask, const infinint &min_compr_size, bool keep_compressed, const crit_action &overwrite, bool warn_overwrite, bool decremental_mode, const infinint &sparse_file_min_size, const fsa_scope &scope, bool delta_signature, bool build_delta_sig, const infinint &delta_sig_min_size, const mask &delta_mask, const delta_sig_block_size &signature_block_size)
void | filtre_merge_step0 (const std::shared_ptr< user_interaction > &dialog, const catalogue *ref1, const catalogue *ref2, statistics &st, bool decremental_mode, crit_action *&decr, const crit_action *&overwrite, bool &abort, thread_cancellation &thr_cancel)
| initialize variables used for merging in step1 and step2
void | filtre_merge_step1 (const std::shared_ptr< user_interaction > &dialog, const mask &filtre, const mask &subtree, catalogue &cat, const catalogue *ref1, const catalogue *ref2, bool info_details, bool display_treated, bool display_skipped, statistics &st, bool make_empty_dir, bool warn_overwrite, bool decremental_mode, crit_action *&decr, const crit_action *&overwrite, bool &abort, thread_cancellation &thr_cancel)
| builds a catalogue from two refs with the given policy and filters
void | filtre_merge_step2 (const std::shared_ptr< user_interaction > &dialog, const pile_descriptor &pdesc, catalogue &cat, bool info_details, bool display_treated, bool display_treated_only_dir, const mask &compr_mask, const infinint &min_compr_size, bool keep_compressed, const infinint &sparse_file_min_size, bool delta_signature, bool build_delta_sig, const infinint &delta_sig_min_size, const mask &delta_mask, bool &abort, thread_cancellation &thr_cancel, bool repair_mode, const delta_sig_block_size &signature_block_size)
| copies data of "cat" catalogue to the pdesc of a brand new archive
void | filtre_sequentially_read_all_catalogue (catalogue &cat, const std::shared_ptr< user_interaction > &dialog, bool lax_read_mode)
std::string | fsa_family_to_string (fsa_family f)
| convert fsa family to readable std::string
std::string | fsa_nature_to_string (fsa_nature n)
| convert fsa nature to readable std::string
fsa_scope | all_fsa_families ()
| provides a scope containing all FSA families
infinint | fsa_scope_to_infinint (const fsa_scope &val)
| convert an fsa scope to infinint
fsa_scope | infinint_to_fsa_scope (const infinint &ref)
| convert an infinint to fsa_scape
std::string | fsa_scope_to_string (bool saved, const fsa_scope &scope)
| convert an fsa scope to readable string
void | get_version (U_I &major, U_I &medium, U_I &minor, bool init_libgcrypt=true)
| return the libdar version, and make libdar initialization (may throw Exceptions)
void | get_version (U_I &major, U_I &medium, U_I &minor, bool init_libgcrypt, bool init_gpgme)
| returns the libdar version and make libdar initialization (may throw Exceptions)
void | get_version (bool init_libgcrypt=true)
| this method is to be used when you don't want to bother with major, medium and minor
void | close_and_clean ()
const char * | generic_file_get_name (gf_mode mode)
| provides a human readable string defining the gf_mode given in argument
void | int_tools_swap_bytes (unsigned char &a, unsigned char &b)
void | int_tools_swap_bytes (unsigned char *a, U_I size)
void | int_tools_expand_byte (unsigned char a, int_tools_bitfield &bit)
void | int_tools_contract_byte (const int_tools_bitfield &b, unsigned char &a)
template<class T >
T | int_tools_rotate_right_one_bit (T v)
template<class T >
T | int_tools_maxof_aggregate (T unused)
void | integer_check ()
| checks sign and width of integer types
bool | integers_system_is_big_endian ()
| returns true if the system is big endian, false else
template<class B >
limitint< B > | operator+ (const limitint< B > &, const limitint< B > &)
template<class B >
limitint< B > | operator+ (const limitint< B > &a, U_I b)
template<class B >
limitint< B > | operator- (const limitint< B > &, const limitint< B > &)
template<class B >
limitint< B > | operator- (const limitint< B > &a, U_I b)
template<class B >
limitint< B > | operator* (const limitint< B > &, const limitint< B > &)
template<class B >
limitint< B > | operator* (const limitint< B > &a, U_I b)
template<class B >
limitint< B > | operator/ (const limitint< B > &, const limitint< B > &)
template<class B >
limitint< B > | operator/ (const limitint< B > &a, U_I b)
template<class B >
limitint< B > | operator% (const limitint< B > &, const limitint< B > &)
template<class B >
limitint< B > | operator>> (const limitint< B > &a, U_32 bit)
template<class B >
limitint< B > | operator>> (const limitint< B > &a, const limitint< B > &bit)
template<class B >
limitint< B > | operator<< (const limitint< B > &a, U_32 bit)
template<class B >
limitint< B > | operator<< (const limitint< B > &a, const limitint< B > &bit)
template<class B >
limitint< B > | operator& (const limitint< B > &a, U_32 bit)
template<class B >
limitint< B > | operator& (const limitint< B > &a, const limitint< B > &bit)
template<class B >
limitint< B > | operator| (const limitint< B > &a, U_32 bit)
template<class B >
limitint< B > | operator| (const limitint< B > &a, const limitint< B > &bit)
template<class B >
limitint< B > | operator^ (const limitint< B > &a, U_32 bit)
template<class B >
limitint< B > | operator^ (const limitint< B > &a, const limitint< B > &bit)
template<class T >
void | euclide (T a, T b, T &q, T &r)
template<class B >
void | euclide (limitint< B > a, U_I b, limitint< B > &q, limitint< B > &r)
trivial_sar * | macro_tools_open_archive_tuyau (const std::shared_ptr< user_interaction > &dialog, S_I fd, gf_mode mode, const label &internal_name, const label &data_name, bool slice_header_format_07, const std::string &execute)
| create an container to write an archive to a pipe
void | macro_tools_open_archive (const std::shared_ptr< user_interaction > &dialog, const std::shared_ptr< entrepot > &where, const std::string &basename, const infinint &min_digits, const std::string &extension, crypto_algo crypto, const secu_string &pass, U_32 crypto_size, pile &stack, header_version &ver, const std::string &input_pipe, const std::string &output_pipe, const std::string &execute, infinint &second_terminateur_offset, bool lax, bool has_external_cat, bool sequential_read, bool info_details, std::list< signator > &gnupg_signed, slice_layout &sl, U_I multi_threaded_crypto, U_I multi_threaded_compress, bool header_only)
| setup the given pile object to contain a stack of generic_files suitable to read an archive
catalogue * | macro_tools_get_derivated_catalogue_from (const std::shared_ptr< user_interaction > &dialog, pile &data_stack, pile &cata_stack, const header_version &ver, bool info_details, infinint &cat_size, const infinint &second_terminateur_offset, std::list< signator > &signatories, bool lax_mode)
| uses terminator to skip to the position where to find the catalogue and read it, taking care of having this catalogue pointing to the real data (context of isolated catalogue — cata_stack — used to rescue an internal archive — data_stack)
catalogue * | macro_tools_get_catalogue_from (const std::shared_ptr< user_interaction > &dialog, pile &stack, const header_version &ver, bool info_details, infinint &cat_size, const infinint &second_terminateur_offset, std::list< signator > &signatories, bool lax_mode)
| uses terminator to skip to the position where to find the catalogue and read it
catalogue * | macro_tools_read_catalogue (const std::shared_ptr< user_interaction > &dialog, const header_version &ver, const pile_descriptor &cata_pdesc, const infinint &cat_size, std::list< signator > &signatories, bool lax_mode, const label &lax_layer1_data_name, bool only_detruits)
| read the catalogue from cata_stack assuming the cata_stack is positionned at the beginning of the area containing archive's dumped data
catalogue * | macro_tools_lax_search_catalogue (const std::shared_ptr< user_interaction > &dialog, pile &stack, const archive_version &edition, compression compr_algo, bool info_details, bool even_partial_catalogues, const label &layer1_data_name)
infinint | macro_tools_get_terminator_start (generic_file &f, const archive_version &reading_ver)
void | macro_tools_create_layers (const std::shared_ptr< user_interaction > &dialog, pile &layers, header_version &ver, slice_layout &slicing, const slice_layout *ref_slicing, const std::shared_ptr< entrepot > &sauv_path_t, const std::string &filename, const std::string &extension, bool allow_over, bool warn_over, bool info_details, const infinint &pause, compression algo, U_I compression_level, U_I compression_block_size, const infinint &file_size, const infinint &first_file_size, const std::string &execute, crypto_algo crypto, const secu_string &pass, U_32 crypto_size, const std::vector< std::string > &gnupg_recipients, const std::vector< std::string > &gnupg_signatories, bool empty, const std::string &slice_permission, bool add_marks_for_sequential_reading, const std::string &user_comment, hash_algo hash, const infinint &slice_min_digits, const label &internal_name, const label &data_name, const infinint &iteration_count, hash_algo kdf_hash, U_I multi_threaded_crypto, U_I multi_threaded_compress)
| build layers for a new archive
void | macro_tools_close_layers (const std::shared_ptr< user_interaction > &dialog, pile &layers, const header_version &ver, const catalogue &cat, bool info_details, crypto_algo crypto, compression algo, const std::vector< std::string > &gnupg_recipients, const std::vector< std::string > &gnupg_signatories, bool empty)
| dumps the catalogue and close all the archive layers to terminate the archive
range | macro_tools_get_slices (const cat_nomme *obj, slice_layout sl)
| gives the location of data EA and FSA (when they are saved) of the object given in argument
void | macro_tools_open_pipes (const std::shared_ptr< user_interaction > &dialog, const std::string &input, const std::string &output, tuyau *&in, tuyau *&out)
| open a pair of tuyau objects encapsulating two named pipes.
proto_compressor * | macro_tools_build_streaming_compressor (compression algo, generic_file &base, U_I compression_level, U_I num_workers)
| return a proto_compressor object realizing the desired (de)compression level/aglo on top of "base" in streaming mode
proto_compressor * | macro_tools_build_block_compressor (compression algo, generic_file &base, U_I compression_level, U_I num_workers, U_I block_size)
| return a proto_compressor object realizing the desired (de)compression level/algo on to of "base" in block mode
mycurl_protocol | string_to_mycurl_protocol (const std::string &arg)
| extract mycurl_protocol from a given URL
over_action_ea | op_tools_crit_ask_user_for_EA_action (user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
| ask user for EA action
over_action_ea | op_tools_crit_ask_user_for_FSA_action (user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
| ask user for FSA action
over_action_data | op_tools_crit_ask_user_for_data_action (user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
| ask user for Data action
void | op_tools_crit_show_entry_info (user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
| show information suited for user comparison and decision for entry in conflict
infinint | operator+ (const infinint &, const infinint &)
infinint | operator- (const infinint &, const infinint &)
infinint | operator* (const infinint &, const infinint &)
infinint | operator* (const infinint &, const unsigned char)
infinint | operator* (const unsigned char, const infinint &)
infinint | operator/ (const infinint &, const infinint &)
infinint | operator% (const infinint &, const infinint &)
infinint | operator& (const infinint &a, const infinint &bit)
infinint | operator| (const infinint &a, const infinint &bit)
infinint | operator^ (const infinint &a, const infinint &bit)
infinint | operator>> (const infinint &a, U_32 bit)
infinint | operator>> (const infinint &a, const infinint &bit)
infinint | operator<< (const infinint &a, U_32 bit)
infinint | operator<< (const infinint &a, const infinint &bit)
void | euclide (infinint a, const infinint &b, infinint &q, infinint &r)
std::string | sar_tools_make_filename (const std::string &base_name, const infinint &num, const infinint &min_digits, const std::string &ext)
bool | sar_tools_extract_num (const std::string &filename, const std::string &base_name, const infinint &min_digits, const std::string &ext, infinint &ret)
bool | sar_tools_get_higher_number_in_dir (user_interaction &ui, entrepot &entr, const std::string &base_name, const infinint &min_digits, const std::string &ext, infinint &ret)
void | sar_tools_remove_higher_slices_than (entrepot &entr, const std::string &base_name, const infinint &min_digits, const std::string &ext, const infinint &higher_slice_num_to_keep, user_interaction &ui)
std::string | sar_tools_make_padded_number (const std::string &num, const infinint &min_digits)
void | tools_init ()
| libdar internal use only: it is launched from get_version() and initializes tools internal variables
void | tools_end ()
| libdar internal use only: it is launched from close_and_clean() and releases tools internal variables
void | tools_write_string (generic_file &f, const std::string &s)
| write a string to a file with a '\0' at then end
void | tools_read_string (generic_file &f, std::string &s)
| read a string from a file expecting it to terminate by '\0'
void | tools_write_string_all (generic_file &f, const std::string &s)
| write a string to a file, '\0' has no special meaning nor is added at the end
void | tools_read_string_size (generic_file &f, std::string &s, infinint taille)
| read a string if given size from a file '\0' has no special meaning
infinint | tools_get_filesize (const path &p)
| retrieve the size in byte of a file
std::string | tools_display_integer_in_metric_system (infinint number, const std::string &unit, bool binary)
std::string::iterator | tools_find_last_char_of (std::string &s, unsigned char v)
| give a pointer to the last character of the given value in the given string
void | tools_blocking_read (int fd, bool mode)
| set blocking/not blocking mode for reading on a file descriptor
std::string | tools_name_of_uid (const infinint &uid)
| convert uid to name in regards to the current system's configuration
std::string | tools_name_of_gid (const infinint &gid)
| convert gid to name in regards of the current system's configuration
std::string | tools_uword2str (U_16 x)
| convert unsigned word to string
std::string | tools_int2str (S_I x)
| convert integer to string
std::string | tools_uint2str (U_I x)
std::string | tools_addspacebefore (std::string s, U_I expected_size)
| prepend spaces before the given string
std::string | tools_display_date (const datetime &date)
| convert a date in second to its human readable representation
char * | tools_str2charptr (const std::string &x)
| convert a string to a char *
U_I | tools_str2int (const std::string &x)
| convert an integer written in decimal notation to the corresponding value
void | tools_system (user_interaction &dialog, const std::vector< std::string > &argvector)
| wrapper to the "system" system call.
void | tools_system_with_pipe (const std::shared_ptr< user_interaction > &dialog, const std::string &dar_cmd, const std::vector< std::string > &argvpipe)
| wrapper to the "system" system call using anonymous pipe to tranmit arguments to the child process
void | tools_write_vector (generic_file &f, const std::vector< std::string > &x)
| write a list of string to file
void | tools_read_vector (generic_file &f, std::vector< std::string > &x)
| read a list of string from a file
std::string | tools_concat_vector (const std::string &separator, const std::vector< std::string > &x)
| concatenate a vectors of strings in a single string
std::vector< std::string > | operator+ (std::vector< std::string > a, std::vector< std::string > b)
| concatenate two vectors
bool | tools_is_equal_with_hourshift (const infinint &hourshift, const datetime &date1, const datetime &date2)
| test if two dates are equal taking care of a integer hour of difference
template<class T >
std::vector< T > | operator+= (std::vector< T > &a, const std::vector< T > &b)
| template function to add two vectors
std::string | tools_readlink (const char *root)
| returns the file pointed to by a symbolic link (or transparent if the file is not a symlink).
void | tools_noexcept_make_date (const std::string &chem, bool symlink, const datetime &last_acc, const datetime &last_mod, const datetime &birth)
| set dates of a given file, no exception thrown
void | tools_make_date (const std::string &chemin, bool symlink, const datetime &access, const datetime &modif, const datetime &birth)
| set dates of a given file, may throw exception
bool | tools_is_case_insensitive_equal (const std::string &a, const std::string &b)
| compare two string in case insensitive manner
void | tools_to_upper (const std::string &r, std::string &uppered)
| convert a string to upper case
std::string | tools_printf (const char *format,...)
| make printf-like formating to a std::string
std::string | tools_vprintf (const char *format, va_list ap)
| make printf-like formating to a std::string
bool | tools_do_some_files_match_mask_regex (const entrepot &ent, const std::string &file_mask)
| test the presence of files corresponding to a given mask in a directory (regex mask)
void | tools_unlink_file_mask_regex (user_interaction &dialog, const entrepot &ent, const std::string &file_mask, bool info_details)
| remove files from a given directory
void | tools_avoid_slice_overwriting_regex (user_interaction &dialog, const entrepot &ent, const std::string &basename, const std::string &extension, bool info_details, bool allow_overwriting, bool warn_overwriting, bool dry_run)
| prevents slice overwriting: check the presence of slice and if necessary ask the user if they can be removed
bool | tools_are_on_same_filesystem (const std::string &file1, const std::string &file2)
| tells whether two files are on the same mounted filesystem
path | tools_relative2absolute_path (const path &src, const path &cwd)
| transform a relative path to an absolute one given the current directory value
void | tools_block_all_signals (sigset_t &old_mask)
| block all signals (based on POSIX sigprocmask)
void | tools_set_back_blocked_signals (sigset_t old_mask)
| unblock signals according to given mask
U_I | tools_count_in_string (const std::string &s, const char a)
| counts the number of a given char in a given string
datetime | tools_get_mtime (user_interaction &dialog, const std::string &s, bool auto_zeroing, bool silent, const std::set< std::string > &ignored_as_symlink=std::set< std::string >())
| returns the last modification date of the given file
infinint | tools_get_size (const std::string &s)
| returns the size of the given plain file
infinint | tools_get_extended_size (std::string s, U_I base)
| convert the given string to infinint taking care of multiplication suffixes like k, M, T, etc.
std::string | tools_substitute (const std::string &hook, const std::map< char, std::string > &corres)
| produce the string resulting from the substition of % macro defined in the map
std::string | tools_hook_substitute (const std::string &hook, const std::string &path, const std::string &basename, const std::string &num, const std::string &padded_num, const std::string &ext, const std::string &context, const std::string &base_url)
| produces the string resulting from the substitution of %... macro
void | tools_hook_execute (user_interaction &ui, const std::string &cmd_line)
| execute and retries at user will a given command line
void | tools_hook_substitute_and_execute (user_interaction &ui, const std::string &hook, const std::string &path, const std::string &basename, const std::string &num, const std::string &padded_num, const std::string &ext, const std::string &context, const std::string &base_url)
| subsititue and execute command line
std::string | tools_output2xml (const std::string &src)
| convert string for xml output
U_I | tools_octal2int (const std::string &perm)
| convert octal string to integer
std::string | tools_int2octal (const U_I &perm)
| convert a number to a string corresponding to its octal representation
char | tools_cast_type_to_unix_type (char type)
| change the libdar internal type representation to the usual unix char type
std::string | tools_get_permission_string (char type, U_32 perm, bool hard)
| convert a permission number into its string representation (rwxrwxrwx)
void | tools_set_permission (S_I fd, U_I perm)
| change the permission of the file which descriptor is given
U_I | tools_get_permission (S_I fd)
| obtain the permission of the file which descriptor is given
uid_t | tools_ownership2uid (const std::string &user)
| change ownership of the file which descriptor is given
uid_t | tools_ownership2gid (const std::string &group)
| convert string group name or gid to numeric gid value
void | tools_set_ownership (S_I filedesc, const std::string &slice_user, const std::string &slice_group)
| change ownership of the file which descriptor is given
void | tools_memxor (void *dest, const void *src, U_I n)
| Produces in "dest" the XORed value of "dest" and "src".
tlv_list | tools_string2tlv_list (user_interaction &dialog, const U_16 &type, const std::vector< std::string > &data)
| Produces a list of TLV from a constant type and a list of string.
U_I | tools_pseudo_random (U_I max)
| Produces a pseudo random number x, where 0 <= x < max.
template<class N , class B >
std::deque< B > | tools_number_base_decomposition_in_big_endian (N number, const B &base)
| Template for the decomposition of any number in any base (decimal, octal, hexa, etc.)
std::string | tools_unsigned_char_to_hexa (unsigned char x)
| convert a unsigned char into its hexa decima representation
std::string | tools_string_to_hexa (const std::string &input)
| convert a string into its hexadecima representation
infinint | tools_file_size_to_crc_size (const infinint &size)
| Defines the CRC size to use for a given filesize.
std::string | tools_getcwd ()
| get current working directory
std::string | tools_get_compression_ratio (const infinint &storage_size, const infinint &file_size, bool compressed)
| return the string about compression ratio
std::string | tools_strerror_r (int errnum)
| wrapper routine to strerror_r
void | tools_secu_string_show (user_interaction &dialog, const std::string &msg, const secu_string &key)
| display the content of a secu_string, this function is only for trouble shooting!
template<class T >
T | tools_max (T a, T b)
template<class T >
T | tools_min (T a, T b)
void | tools_unlink (const std::string &filename)
| remove from filesystem the file which path is given
std::string | tools_escape_chars_in_string (const std::string &val, const char *to_escape)
| escape with a anti-slash character a set of chars found in the given string
bool | tools_infinint2U_64 (infinint val, U_64 &res)
| convert an infinint to U_64 (aka "uint64_t" or yet "unsigned long long")
bool | tools_my_atoi (const char *a, U_I &val)
| ascii to integer conversion
infinint | tools_double2infinint (double arg)
| convert a double (float) to infinint (integer) taking care of rounding it to the closest value
template<class T >
void | tools_check_negative_date (T &val, user_interaction &ui, const char *inode_path, const char *nature, bool ask_before, bool silent)
| check the value is not negative, and if asked set it to zero
infinint | tools_upper_rounded_log2 (const infinint &ref)
| compute an approximate log2 of the argument
infinint | tools_lower_rounded_exp2 (const infinint &ref)
| compute an approximate exp2 of the argument
infinint | tools_rounded_square_root (const infinint &ref)
| compute an approximate square root of the argument
infinint | tools_rounded_cube_root (const infinint &ref)
| compute an approximate cube root of the argument
std::string | sar_make_filename (const std::string &base_name, const infinint &num, const infinint &min_digits, const std::string &ext)
| return the name of a slice given the base_name, slice number and extension

## Variables
constexpr U_I | LIBDAR_COMPILE_TIME_MAJOR = 6
| libdar Major version defined at compilation time
constexpr U_I | LIBDAR_COMPILE_TIME_MEDIUM = 8
| libdar Medium version defined at compilation time
constexpr U_I | LIBDAR_COMPILE_TIME_MINOR = 2
| libdar Minor version defined at compilation time
const U_32 | SAUV_MAGIC_NUMBER = 123
const label | label_zero
constexpr U_I | GLOBAL_ELASTIC_BUFFER_SIZE = 51200
const archive_version | macro_tools_supported_version
const std::string | LIBDAR_STACK_LABEL_UNCOMPRESSED
const std::string | LIBDAR_STACK_LABEL_CLEAR
const std::string | LIBDAR_STACK_LABEL_UNCYPHERED
const std::string | LIBDAR_STACK_LABEL_LEVEL1
const std::string | PSEUDO_ROOT
| root name to use when archive operation does not use filesystem (archive testing for example)
const path | FAKE_ROOT
| root path object based on PSEUDO_ROOT
constexpr const U_I | default_uncompressed_block_size = 102400
constexpr const U_I | min_uncompressed_block_size = 100
const int | WR_OK = 0
const int | WR_MEM_ERROR = 1
const int | WR_VERSION_ERROR = 2
const int | WR_STREAM_ERROR = 3
const int | WR_DATA_ERROR = 4
const int | WR_NO_FLUSH = 5
const int | WR_BUF_ERROR = 6
const int | WR_STREAM_END = 7
const int | WR_FINISH = 8
constexpr unsigned char | ANSWER_TYPE_DATA = 'D'
constexpr unsigned char | ANSWER_TYPE_INFININT = 'I'
constexpr U_I | REQUEST_SIZE_SPECIAL_ORDER = 0
constexpr U_I | REQUEST_OFFSET_END_TRANSMIT = 0
constexpr U_I | REQUEST_OFFSET_GET_FILESIZE = 1
constexpr U_I | REQUEST_OFFSET_CHANGE_CONTEXT_STATUS = 2
constexpr U_I | REQUEST_IS_OLD_START_END_ARCHIVE = 3
constexpr U_I | REQUEST_GET_DATA_NAME = 4
constexpr U_I | REQUEST_FIRST_SLICE_HEADER_SIZE = 5
constexpr U_I | REQUEST_OTHER_SLICE_HEADER_SIZE = 6

## Detailed Description

libdar namespace encapsulate all libdar symbols

. class database_open_options . class database_dump_options . class database_add_options . class database_remove_options . class database_change_basename_options . class database_change_path_options . class database_restore_options . class database_used_options

Several classes are defined here:

- class parallel_block_compressor, which has similar interface and behavior as class compressor but compresses a data of a file per block of given size which allows parallel compression of a given file's data at the cost of memory requirement and probably a less good compression ratio (depends on the size of the blocks)
- class zip_below_write which gather the compressed data works of workers toward the filesystem
- class zip_below_read which provides block of compressed data to workers comming from the filesystem
- class zip_worker which instanciates worker objects to compute in parallel the compression of block of data

the compressed block structure is a sequence of 2 types of data

- data to compress/uncompress
- eof

COMPRESSION PROCESS

*** in the archive:

the block stream is an arbitrary length sequence of data blocks followed by an eof. Each data block consists of an infinint determining the length of following field that stores the compressed data of variable length the compressed data comes from block of uncompressed data of constant size (except the last one that is smaller. THis information is needed to prepare memory allocation and is stored in the archive header (archive reading) or provided by the user (archive creation). Providing 0 for the block size leads to the classical/historical but impossible to parallelize compression algorithm (gzip, bzip2, etc.)

*** between threads:

when compressing, the inherited_write call produces a set of data block to the ratelier_scatter treated by a set of zip_workers which in turn passe the resulting compressed data blocks to the zip_below_write thread.

last when eof is reached or during terminate() method, N eof blocks are sent where N is the number of zip_workers, either with flag eof, or die (termination). the eof flag is just passed by the workers but the zip_below_write thread collects them and awakes the main thread once all are collected and thus all data written. the die flag drives the thread termination, worker first pass them to the zip_below_thread which collect them and terminates too.

blocks used are of type crypto_segment the clear_data containes the uncompressed data, the crypted_data block contains the compressed data. The block_index is not used.

upon receiption of data blocks, each zip_workers read the clear_data and produce the compressed data to the crypted_data mem_block and pushes that to the ratelier_gather which passed to and write down by the zip_below_write.

UNCOMPRESSON PROCESS

the zip_below_read expectes to find the clear_block size at construction time and provides a method to read it by the parallel_block_compressor thread which allocate the mem_blocks accordingly in a pool (same as parallel_tronconneuse). The zip_below thread once started reading the blocks and push them into the ratelier_scatter (without the initial U_32 telling the size of the compressed data that follows). Upon error (incoherent strucuture ....) the thread pushes N error block in the ratelier_scatter and terminates

the zip_workers fetch a block and put the corresponding uncompressed data to the clear_data mem_block then push the crypto_segment to the ratelier_gather. Upon uncompression error, the error flag is set with the crypto_segment, the zip_worker continues to work anyway until it reads a crypto_segment with the eof_die flag from the ratelier_scatter. Upon reception of the error flag from the ratelier_gather the parallel_compression thread invoke a method of the zip_below_read that triggers the thread to terminate after having pushed N error blocks to the ratelier_scatter which in turns triggers the termination of the zip_workers. The parallel_block_compressor thread can then gather the N error block from the ratelier_gather, join() the threads and report the compression error

Several classes are defined here:

- class parallel_tronconneuse, which has similar interface and behavior as class tronconneuse
- class read_below, is used internally by parallel_tronconneuse in read-only mode to feed workers with encrypted data of the underlay
- class write_below, is used internally by parallel_tronconneuse in write-only mode to write down the encrypted data produced by the workers
- class crypto_workers, that transform data between parallel_tronconneuse and the read_below class or the write_below class depending on the context. Several objects of this class executes in parallel the crypto_module routine, but there is only one read_below or write_below thread, the class parallel_tronconneuse stays executed by the main/original/calling thread

the class thread_cancellation implemented in this module permits both the definition of checkpoints where is looked whether the current thread has been marked as to be canceled by the user and the interface that let the user request a thread to be cancelled The advantage of this class is that it then throws a Euser_abort exception which properly terminates the libdar operation in the thread freeing allocated memory and release mutex properly. Note that the thread is not cancelled but the libdar call in this thread returns as soon as a checkpoint is met during the execution.

## Function Documentation

## ◆ integer_check()

void libdar::integer_check | ( |  | ) |

checks sign and width of integer types

Note
  this call may throws an Ehardware exception

## ◆ integers_system_is_big_endian()

bool libdar::integers_system_is_big_endian | ( |  | ) |

returns true if the system is big endian, false else

Note
  this call may throw an Ehardware() exception if the system is not coherent for all integer types