Zeroing hash only for xxhash

For xxhash one use only first 64 bit from 256 bit hash field
Zeroing empty 192 bits with offset

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Delete useless memset before XXH64_reset

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
- Add a murmur3 implementation for csum

Mark: manually merged Makefile changes

Signed-off-by: Jack Kenrick <github@jack.fr.eu.org>
Signed-off-by: Mark Fasheh <mfasheh@suse.de>
- Few coding style fixes

Signed-off-by: Jack Kenrick <github@jack.fr.eu.org>
Signed-off-by: Mark Fasheh <mfasheh@suse.de>
murmur3: add hash_type

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
murmur3: add warning

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
murmur3: zero unused portion of digest

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
- Allow a running checksum with variables block size

Signed-off-by: Jack Kenrick github@jack.fr.eu.org
- A lot of cleanups & bug fixes

Signed-off-by: Jack Kenrick github@jack.fr.eu.org
Fix warning in csum-murmur3.c

Easiest is to just memcpy instead of the strncat().

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
csum-murmur3: don't null terminate rem_buffer

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
csum-murmur3: add some asserts

To help us catch overruns on rem_buffer.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
csum-murmur3: remove unused code at bottom of add_to_running_checksum

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
csum-murmur3: shrink rem_buffer

We empty it at the top of add_to_running_checksum() if it would otherwise
become as large or larger than a 16 byte block. In that case, we know that
it can never be larger than 15 bytes. Change the definition to reflect this
and update the assert at the bottom of add_to_running_checksum().

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Have show-shared-extents to take a file list as arguments.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
csum-murmur3: don't memset rem_buffer

This is overflowing the buffer and is not necessary anyway since we calloc
the struct which rem_buffer is a member of.

Since we define a constant for its size, we can use that to simplify
some of our asserts. This also removes a redundant assert from the top of
start_running_checksum().

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
- Add manpages for show-shared-extents and hashstats.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Add option to choose hash type used.

This adds an option to duperemove (and csum-test), '--hash=' which allows
the user to pick which algorithm is used for hashing blocks.

Internally we make a hash_module structure which holds function pointers to
the various hashing operations as well pointers to friendly and internal
names. The init_hash() function is changed to take a string and will choose
the module structure whose hash name matches that string.

Aside from defining a module structure, the changes to each hash module c
file are minimal - renaming functions and variables so we don't clash.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
cp during 'make tarball' was warning of the hashing files being specified
twice. We don't need to specify them directly in DIST_CFILES so remove that.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Bump version in master branch so we don't confuse it with the stable
v0.09-branch.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>