Yann Collet
993dcf89f7
fixed xxhsum verification values (partial)
2020-02-13 21:53:35 -08:00
Yann Collet
1a67ed4437
return non-zero on empty string :
...
answering : https://github.com/Cyan4973/xxHash/issues/175#issuecomment-548108921
The probability of receiving an empty string is larger than random (> 1 / 2^64),
making the generated hash more "common".
For some algorithm, it's an issue if this "more common" value is 0.
Maps it instead to an avalanche of an arbitrary start value (prime64).
The start value is blended with the `seed` and the `secret`,
so that the result is dependent on those ones too.
2020-02-12 15:22:13 -08:00
Yann Collet
dadf1ef766
fix xxhash.h include from xxh3.h
2020-02-12 14:36:11 -08:00
Yann Collet
160e37d349
Merge branch 'dev' into s390x
2020-02-12 12:12:46 -08:00
Yann Collet
6a4e870843
removed cygwin code path
...
it's not useful :
cygwin uses the posix code path
fix #100
2020-02-10 16:37:04 -08:00
Yann Collet
7d4c33a025
fixed a bunch of cppcheck minor warnings
...
not all, as some are plain false positives with no obvious replacement.
2019-12-27 16:17:33 -08:00
easyaspi314 (Devin)
6aa9beeb50
[s390x] Identify s390x in xxhsum
2019-12-14 16:30:22 -05:00
Yann Collet
ae245428b8
update internal benchmark
...
to reduce risks of rounding bias
when a measurement uses a too small amount of time.
2019-12-10 13:12:28 -08:00
Yann Collet
e6dc2443f0
fix: multiple include with/without XXH_STATIC_LINKING
2019-10-11 07:50:06 -07:00
Yann Collet
4e4570f751
removed non-error messages from stderr when specifying -q
2019-10-07 08:25:57 -07:00
Yann Collet
73e6c5206c
simplified type declaration
...
some types were not needed.
Also : xxh_u* type are only necessary within libxxhash,
not xxhsum
2019-10-07 07:52:32 -07:00
easyaspi314 (Devin)
368a6f9699
Improve typedefs, fix 16-bit int/seed type bug
...
Fixes #258 .
```c
BYTE -> xxh_u8
U32 -> xxh_u32
U64 -> xxh_u64
```
Additionally, I hopefully fixed an issue for targets where int is 16
bits. XXH32 used unsigned int for its seed, and in C90 mode, unsigned
int as its U32. This would cause truncation issues. I check limits.h in
C90 mode to make sure UINT_MAX == 0xFFFFFFFFUL, and if it isn't, use
unsigned long.
We should see if we can set up an AVR CI test. Just to run the
verification program, though, as the benchmark will take a very long
time.
Lastly, the seed types are XXH32_hash_t and XXH64_hash_t for XXH32/64.
This matches xxhash.c and prevents the aforementioned 16-bit int bug.
2019-10-06 19:14:12 -04:00
easyaspi314 (Devin)
91d6e4927e
Use both seeded and unseeded variants in the bench
...
Previously, XXH3_64bits looked much faster than XXH3_128bits. The truth
is that they are similar in long keys. The difference was that
XXH3_64b's benchmark was unseeded, putting it at an unfair advantage
over XXH128 which is seeded.
I don't think I am going to do the dummy bench. That made things moe
complicated.
2019-10-01 23:23:55 -04:00
Yann Collet
c8f3fb514c
factorized mix32B
...
changing xxh128 results for len within 129-240.
2019-09-30 22:36:07 -07:00
Yann Collet
43b5c76b4c
fixed mistake in last ingested segment
2019-09-30 17:33:38 -07:00
Yann Collet
0bed0c2e5b
updated self-test values for xxh128
2019-09-30 17:26:04 -07:00
Yann Collet
cd0f5c2209
slightly updated xxh128 at len 1-3
...
for a slightly better bias
2019-09-28 20:02:55 -07:00
Yann Collet
549fca1204
added capability to control XXH128 hashes
...
added xxh128sum link
2019-09-28 16:49:11 -07:00
Yann Collet
d5336efe31
fixed extraneous ' ' character
...
failing `-c` verification test
2019-09-28 14:58:07 -07:00
Yann Collet
ce7dbf03e0
improved programming pattern for hashStream
2019-09-28 14:27:32 -07:00
Yann Collet
e098fffe0a
fix #259
...
fix collisions for xxh128 in 9-16 bytes range
2019-09-27 17:55:33 -07:00
Yann Collet
3649220147
added tests for xxh128sum
2019-09-27 17:50:02 -07:00
Yann Collet
af010ba987
added xxh128sum
...
== xxhsum -H2
2019-09-27 17:40:36 -07:00
Yann Collet
d8551d294d
xxhsum -q does not display "Loading" notification
...
fix #251
2019-09-17 18:08:32 -07:00
easyaspi314 (Devin)
512b883665
[PPC64] Fix VSX, POWER8 support, and disable POWER7.
...
The VSX codepath is now working on POWER8 and is fully enabled.
The little endian code has been verified on POWER8E, although
a big endian machine was not available.
This uses vpermxor from POWER8 to shuffle on big endian.
There are a few other fixes as well to unify endian memes.
2019-08-20 21:06:11 -04:00
Yann Collet
10904c1277
added XXH_REROLL consistency test
...
to catch issues such as #240 .
Also added XXH64 test for len==4
2019-08-10 11:44:30 +02:00
Yann Collet
401c7d152d
xxh128: fix incorrect swap
2019-07-23 16:23:38 -07:00
Yann Collet
dba981268a
fixed namespace emulation
2019-07-23 16:12:13 -07:00
Yann Collet
2d95987ef4
completed xxh128 tests
2019-07-19 17:53:04 -07:00
Yann Collet
6a52dd28da
simple cross-pollenization
...
input impacts 128-bit of accumulator (in 128-bit mode)
2019-07-19 16:21:17 -07:00
Yann Collet
e0bfe4440f
fix potential issue with mid-size inputs associated with minimum size custom secret
2019-07-17 15:46:16 -07:00
Yann Collet
d9b65e78e1
added test case for #222
...
and a simpler fix : just init bufferedSize to 0 after consumption.
2019-07-03 14:23:43 -07:00
Yann Collet
e6ec5c0eb5
xxh3: updated formula for len 1-8
...
guarantee of no collision for 2 different inputs of same len.
2019-06-18 11:07:06 -07:00
Yann Collet
35d1e2fd7e
completed midsize (129-240)
...
including streaming and self-tests
2019-06-17 14:16:52 -07:00
Yann Collet
e9b91102eb
completed tests for streaming with custom secret
...
fixed streaming with custom secret on small input
2019-06-14 12:26:33 -07:00
Yann Collet
47ce68677a
updated selft-test sample generator
...
to generate more random bytes (and less zero).
updated tests accordingly.
confirmed XXH3 streaming more works fine (default & seed).
2019-06-14 11:51:44 -07:00
Yann Collet
6f0320e2d8
first test of XXH3 streaming variant
...
note : self-test output traces
2019-06-14 11:34:24 -07:00
Yann Collet
0556bd2318
completed variant of xxh3 streaming supporting custom secret
...
still to be tested
2019-06-13 18:24:10 -07:00
Yann Collet
5902eb1cc1
Merge branch 'dev' into xxh3streamv2
2019-06-13 15:56:41 -07:00
Yann Collet
0aef33ed12
fix minor warning (compilation of xxh3 test)
2019-06-11 11:25:45 -07:00
Yann Collet
04557272e5
test generic short input functions
...
suitable for both custom seed and secret
2019-06-11 11:13:44 -07:00
Yann Collet
6a923e1dc1
first implementation of xxh3 streaming
2019-05-04 20:10:52 -07:00
Yann Collet
f083d6ed4a
added make help target
...
fixed minor static analyzer warnings (cppcheck)
2019-05-03 10:14:42 -07:00
Yann Collet
f577b99b0e
Merge branch 'dev' into xxh128
2019-05-02 15:30:42 -07:00
Yann Collet
6a64e4f17e
first xxh128 design
...
not terribly fast, but "acceptable" speed
2019-04-29 17:44:45 -07:00
easyaspi314 (Devin)
021668b9d0
Port over the VSX version
...
Supports both big and little endian.
2019-04-26 15:56:26 -04:00
Yann Collet
3622b1496e
tested new 64bits accumulator
...
disguised as xxh128
2019-04-25 09:55:10 -07:00
Yann Collet
095c978912
updated XXH128 for long input (> 128B)
...
scalar version only for the time being
2019-04-24 17:38:07 -07:00
Yann Collet
5543733900
xxh3-64bits : completed self-tests
2019-04-22 16:21:03 -07:00
Yann Collet
bef31a75e9
fixed minor gcc warning
...
xxh128 tests not restored yet
2019-03-28 22:50:30 -06:00