Added xxhash algorithm

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Merge https://github.com/Nefelim4ag/duperemove into xxhash

Conflicts:
	Makefile

Also added xxhash.c and csum-xxhash.c to CFILES variable.

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

This isn't getting tested, and we don't need two libraries for hashing.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Merge branch 'xxhash' into merge-xxhash

Conflicts:
	Makefile

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Add a license file for xxHash.

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

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
xxhash: Always use 64 bit digest

This keeps things platform independent for us.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
xxhash: use constant size for FACTOR

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Add hash_type for csum-xxhash.c.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Let csum-test take a user supplied buffer size. This makes it easy to force
a particular routine (running checksum vs one-shot) when testing that csum
output makes sense.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Update comment about checksum_block not zeroing the digest in
csum_whole_file()

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

Don't sum up the checksums as the resulting digest will be different for the
same input depending on whether we use the one-shot or running checksum
functions.

This does result in a smaller digest, padded to the end with zeros which
doesn't look great (we can always fix that) but is correct.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Add comment in csum-test describing usage.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
xxhash: set hash_type string

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
xxhash: Use pointer to set digest

This reads more clearly.

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

- xxhash looks good in my limited tests but I'd like to be conservative for
  now and print a warning that it might change as we work out any issues.

- fix pointer warning

- update comment at top of file

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