46 #ifndef HASHTABLE_NSTATS 66 int strong_len, rs_long_t sig_fsize);
73 rs_weak_sum_t weak_sum,
74 rs_strong_sum_t *strong_sum);
77 rs_long_t rs_signature_find_match(
rs_signature_t *sig, rs_weak_sum_t weak_sum,
78 void const *buf,
size_t len);
87 #define rs_signature_check(sig) do {\ 88 assert(((sig)->magic == RS_BLAKE2_SIG_MAGIC && (sig)->strong_sum_len <= RS_BLAKE2_SUM_LENGTH)\ 89 || ((sig)->magic == RS_MD4_SIG_MAGIC && (sig)->strong_sum_len <= RS_MD4_SUM_LENGTH));\ 90 assert(0 < (sig)->block_len);\ 91 assert(0 < (sig)->strong_sum_len && (sig)->strong_sum_len <= RS_MAX_STRONG_SUM_LENGTH);\ 92 assert(0 <= (sig)->count && (sig)->count <= (sig)->size);\ 93 assert(!(sig)->hashtable || (sig)->hashtable->count <= (sig)->count);\ 97 static inline void rs_signature_calc_strong_sum(
rs_signature_t const *sig,
98 void const *buf,
size_t len,
102 rs_calc_blake2_sum(buf, len, sum);
104 rs_calc_md4_sum(buf, len, sum);
int size
Total number of blocks allocated.
hashtable_t * hashtable
The hashtable for finding matches.
int count
Total number of blocks.
int block_len
The block length.
A signature file using the BLAKE2 hash.
rs_weak_sum_t weak_sum
Block's weak checksum.
int strong_sum_len
The block strong sum length.
void * block_sigs
The packed block_sigs for all blocks.
Signature of a whole file.
rs_result
Return codes from nonblocking rsync operations.
int magic
The signature magic value.
long calc_strong_count
The count of strongsum calcs done.
Signature of a single block.
A generic open addressing hashtable.
rs_strong_sum_t strong_sum
Block's strong checksum.