26#ifndef DELTA_SIG_BLOCK_SIZE_HPP
27#define DELTA_SIG_BLOCK_SIZE_HPP
29#include "//include/dar/libdar_my_config.h"
35#include "//include/dar/infinint.hpp"
37#ifndef RS_DEFAULT_BLOCK_LEN
38#define RS_DEFAULT_BLOCK_LEN 2048
49 struct delta_sig_block_size
71 delta_sig_block_size() {
reset(); };
73 delta_sig_block_size(delta_sig_block_size && ref)
noexcept =
default;
74 delta_sig_block_size & operator = (
const delta_sig_block_size & ref) =
default;
75 delta_sig_block_size & operator = (delta_sig_block_size && ref)
noexcept =
default;
76 ~delta_sig_block_size() =
default;
78 bool operator == (
const delta_sig_block_size & ref)
const;
the arbitrary large positive integer class
libdar namespace encapsulate all libdar symbols
infinint multiplier
function dependently used multiplier
U_I min_block_len
calculated block len will never be lower than that
fs_function_t fs_function
the function to use to calculate the signature block len
void check() const
check the sanity of the provided values
fs_function_t
defines the function to use to derivate block size from file size
@ fixed
block size is independant from file size
@ linear
block size if proportionnal to file size
@ root3
block size if proportional to the cube root of the file size
@ root2
block size is proportional to the square root of file size
@ log2
block size is proportional to log2(file size)
delta_sig_block_size(const delta_sig_block_size &ref)=default
set the structure to defaults value
U_I calculate(const infinint &filesize) const
calculate the value of the block size given the file size
bool equals_default()
whether structure has default values
infinint divisor
function dependently used divisor
U_I max_block_len
calculated block len will never be higer than that except if this field is set to zero (disabling thi...
void reset()
reset to default value