Printing xxh128sum's help for example would say default algo is xxh64,
which is not correct. Adjust g_defaultAlgo accordingly as well as the
currently selected algorithm.
also : fixed XXH128_withSecret(),
which was messed up with default `kSecret`.
This error remained unnoticed because their was no test for this variant.
Added a test in `xxhsum` checking results of `XXH128_withSecret()`
hidden option for the time being (undocumented)
as it's only an output format,
there is no ability to `-c` check it yet.
The effort was however useful in refactoring `xxhsum` code base.
One advantage of the `--tag` BSD format is
that it's a lot safer to introduce additional formats.
For example, little and big-endian variants can co-exist safely,
since endianess is clearly expressed as part of the algorithm name.
It would also make it possible to introduce XXH3 (later),
even though it's 64-bit, which would be confusing with XXH64.
Also :
added ability to select algorithm by specifying bit width.
Hence :
H0 == H32 ==> XXH32
H1 == H64 ==> XXH64
H2 == H128==> XXH128
For example, `xxhsum -b1 -b2` will benchmark XXH32 in both aligned and unaligned mode.
Also : modified default list,
now only test main variants (XXH32, XXH64, XXH3 and XXH128).
Also : -bi0 makes it possible to generate a very quick (though inaccurate) evaluation.
replace 2 functions : XXH3_64bits() and XXH3_64bits_withSeed()
new target : make dispatch
compiled with -mavx2 by default
compiles fine with -mavx512f, but then crash at runtime detection
Streaming implementation of XXH3/XXH128 could fail, reporting an incorrect hash value,
for certain specific ranges of length, and providing input in segments of random length.
issue reported by @WayneD
fix#378
updated test case to catch this issue
* Remove --quiet and "Loading ..." from manpage
* Remove "Loading ..." from markdown manpage
* Removing "Loading..." from code
* Update tests for "Loading..."
* Remove the remaining "Loading..." from source
Forgot about this one
* Test error message on non-existing file
* Fix a typo in a test (xxhsum vs ./xxhsum)
* Fix a typo for real. noneexistent -> nonexistent
Tested.
Use `__wgetmainargs()` instead of `GetCommandLineW()` and
`CommandLineToArgvW()`. While it is an internal API, aside from
declaring the function, it actually simplifies things a lot, as we can
setup a `wmain()` equivalent in a few lines.
It also avoids linking to `Shell32.dll`, which is a lot of bloat for a
simple command line utility.
Most importantly, this supports wildcards on `cmd.exe`, fixing #341.
Also improved comments and did minor cleanup.
Uses a table and a loop to reduce copy/paste and allow easy testing of
other hash functions. Create a wrapper and insert it into
g_hashesToBench, and it will automatically be added to the benchmark.
The hash display line has been made longer to actually fit xxHash's
names instead of clipping them. It is also configurable.