dedup

data deduplication program
git clone git://git.2f30.org/dedup.git
Log | Files | Refs | README | LICENSE

commit 7f984c9b4136d768e72f31d99666b72bca12d7f2
parent 4898c6cfb92a378928c29895d4ca55536121b52d
Author: sin <sin@2f30.org>
Date:   Sun,  7 Apr 2019 12:52:00 +0100

Re-organize flags a bit

We might want to support more than one compression algo in the future.
Reserve 2 bits for that field.

Diffstat:
Mdedup.h | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dedup.h b/dedup.h @@ -22,11 +22,10 @@ #define VER_MAJ_SHIFT 8 #define VER_MAJ_MASK 0xff +#define HASH_ALGO_SHIFT 18 +#define HASH_ALGO_MASK 0x7 /* max 8 hash algos */ #define COMPR_ENABLED_SHIFT 16 -#define COMPR_ENABLED_MASK 0x1 - -#define HASH_ALGO_SHIFT 17 -#define HASH_ALGO_MASK 0x7 /* max 8 hash algos */ +#define COMPR_ENABLED_MASK 0x3 /* max 4 compression algos */ enum hash_algo { BLAKE2B_ALGO,