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

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
libdar::delta_sig_block_size Struct Reference

defines how to calculate delta signature block size based of file size to delta sign More...

`#include <delta_sig_block_size.hpp>`

## Public Types
enum | fs_function_t { fixed , linear , log2 , root2 , root3 , fixed , linear , log2 , root2 , root3 }
| defines the function to use to derivate block size from file size More...
enum | fs_function_t { fixed , linear , log2 , root2 , root3 , fixed , linear , log2 , root2 , root3 }
| defines the function to use to derivate block size from file size More...

## Public Member Functions
| delta_sig_block_size (const delta_sig_block_size &ref)=default
| set the structure to defaults value
| delta_sig_block_size (delta_sig_block_size &&ref) noexcept=default
delta_sig_block_size & | operator= (const delta_sig_block_size &ref)=default
delta_sig_block_size & | operator= (delta_sig_block_size &&ref) noexcept=default
bool | operator== (const delta_sig_block_size &ref) const
void | reset ()
| reset to default value
bool | equals_default ()
| whether structure has default values
void | check () const
| check the sanity of the provided values
U_I | calculate (const infinint &filesize) const
| calculate the value of the block size given the file size
| delta_sig_block_size (const delta_sig_block_size &ref)=default
| set the structure to defaults value
| delta_sig_block_size (delta_sig_block_size &&ref) noexcept=default
delta_sig_block_size & | operator= (const delta_sig_block_size &ref)=default
delta_sig_block_size & | operator= (delta_sig_block_size &&ref) noexcept=default
bool | operator== (const delta_sig_block_size &ref) const
void | reset ()
| reset to default value
bool | equals_default ()
| whether structure has default values
void | check () const
| check the sanity of the provided values
U_I | calculate (const infinint &filesize) const
| calculate the value of the block size given the file size

## Public Attributes
fs_function_t | fs_function
| the function to use to calculate the signature block len
infinint | multiplier
| function dependently used multiplier
infinint | divisor
| function dependently used divisor
U_I | min_block_len
| calculated block len will never be lower than that
U_I | max_block_len
| calculated block len will never be higer than that except if this field is set to zero (disabling this ceiling check)

## Detailed Description

defines how to calculate delta signature block size based of file size to delta sign

Note
  the global formula is block_size = multiplicator/divisor*fs_function(filesize)
  of course, divisor cannot be null

Definition at line 49 of file dar64-2.8.3-win64/include/dar/delta_sig_block_size.hpp.

## Member Enumeration Documentation

## ◆ fs_function_t [1/2]

enum libdar::delta_sig_block_size::fs_function_t

defines the function to use to derivate block size from file size

Enumerator
fixed | block size is independant from file size
linear | block size if proportionnal to file size
log2 | block size is proportional to log2(file size)
root2 | block size is proportional to the square root of file size
root3 | block size if proportional to the cube root of the file size
fixed | block size is independant from file size
linear | block size if proportionnal to file size
log2 | block size is proportional to log2(file size)
root2 | block size is proportional to the square root of file size
root3 | block size if proportional to the cube root of the file size

Definition at line 52 of file dar64-2.8.3-win64/include/dar/delta_sig_block_size.hpp.

## ◆ fs_function_t [2/2]

enum libdar::delta_sig_block_size::fs_function_t

defines the function to use to derivate block size from file size

Enumerator
fixed | block size is independant from file size
linear | block size if proportionnal to file size
log2 | block size is proportional to log2(file size)
root2 | block size is proportional to the square root of file size
root3 | block size if proportional to the cube root of the file size
fixed | block size is independant from file size
linear | block size if proportionnal to file size
log2 | block size is proportional to log2(file size)
root2 | block size is proportional to the square root of file size
root3 | block size if proportional to the cube root of the file size

Definition at line 52 of file src/libdar/delta_sig_block_size.hpp.

## Constructor & Destructor Documentation

## ◆ delta_sig_block_size() [1/2]

libdar::delta_sig_block_size::delta_sig_block_size | ( |  | ) |
| inline

Definition at line 71 of file dar64-2.8.3-win64/include/dar/delta_sig_block_size.hpp.

## ◆ delta_sig_block_size() [2/2]

libdar::delta_sig_block_size::delta_sig_block_size | ( |  | ) |
| inline

Definition at line 71 of file src/libdar/delta_sig_block_size.hpp.

## Member Function Documentation

## ◆ calculate() [1/2]

U_I libdar::delta_sig_block_size::calculate | ( | const infinint & | filesize | ) | const

calculate the value of the block size given the file size

Parameters

  [in] | filesize | is the size of the file which delta signature to be calculated

Returns
  the block len to use for delta signature

## ◆ calculate() [2/2]

U_I libdar::delta_sig_block_size::calculate | ( | const infinint & | filesize | ) | const

calculate the value of the block size given the file size

Parameters

  [in] | filesize | is the size of the file which delta signature to be calculated

Returns
  the block len to use for delta signature

## ◆ equals_default() [1/2]

bool libdar::delta_sig_block_size::equals_default | ( |  | ) |
| inline

whether structure has default values

Definition at line 84 of file dar64-2.8.3-win64/include/dar/delta_sig_block_size.hpp.

## ◆ equals_default() [2/2]

bool libdar::delta_sig_block_size::equals_default | ( |  | ) |
| inline

whether structure has default values

Definition at line 84 of file src/libdar/delta_sig_block_size.hpp.

## Member Data Documentation

## ◆ divisor

infinint libdar::delta_sig_block_size::divisor

function dependently used divisor

Definition at line 65 of file dar64-2.8.3-win64/include/dar/delta_sig_block_size.hpp.

## ◆ fs_function

fs_function_t libdar::delta_sig_block_size::fs_function

the function to use to calculate the signature block len

Definition at line 63 of file dar64-2.8.3-win64/include/dar/delta_sig_block_size.hpp.

## ◆ max_block_len

U_I libdar::delta_sig_block_size::max_block_len

calculated block len will never be higer than that except if this field is set to zero (disabling this ceiling check)

Definition at line 67 of file dar64-2.8.3-win64/include/dar/delta_sig_block_size.hpp.

## ◆ min_block_len

U_I libdar::delta_sig_block_size::min_block_len

calculated block len will never be lower than that

Definition at line 66 of file dar64-2.8.3-win64/include/dar/delta_sig_block_size.hpp.

## ◆ multiplier

infinint libdar::delta_sig_block_size::multiplier

function dependently used multiplier

Definition at line 64 of file dar64-2.8.3-win64/include/dar/delta_sig_block_size.hpp.

The documentation for this struct was generated from the following files:

- dar64-2.8.3-win64/include/dar/delta_sig_block_size.hpp
- src/libdar/delta_sig_block_size.hpp