spaette
989c5005b5
typos
2024-06-19 12:46:10 -05:00
Yann Collet
9f465f1ea9
Merge pull request #939 from Cyan4973/detect894
...
updated internal check in xxhsum
2024-05-07 20:20:09 -07:00
Yann Collet
8e483e4dd2
update XSUM_benchMem() doc
2024-05-07 18:21:56 -07:00
Yann Collet
02fe5d152a
update version number to v0.8.3
...
reflecting the change for results produced by XXH3_128bits_withSecretandSeed() for the specific case of `seed == 0` and `len < 240`.
2024-05-07 18:21:56 -07:00
Yann Collet
e9f1b96702
sanity checks use XXH3_MIDSIZE_MAX from xxhash.h
2024-05-07 18:19:26 -07:00
Yann Collet
bd51be8d1e
updated internal check in xxhsum
...
to catch bugs such as #894
2024-05-07 18:16:57 -07:00
Pavel P
b54324acee
Correct check for Windows compilation
...
`_WIN32` is the proper check for compilation for Windows. `WIN32` is defined when `Windows.h` is included or could be defined by some projects
2024-04-01 22:06:02 +02:00
Yann Collet
59b651e386
detail selectable hash algorithms on -h page
...
suggested by @sergeevabc
2023-12-27 21:12:06 -08:00
Klemens Nanni
6fceee6b20
xxhsum: use pledge(2) on OpenBSD
...
In case no files are passed, i.e. only standard input is read,
The "rpath" promise could be dropped at a later point,
but that needs more patching.
https://man.openbsd.org/pledge.2
2023-09-14 10:49:27 +01:00
Yann Collet
ee14620ae7
added tests for xxh3sum
...
and updated man pages.
2023-07-25 18:57:11 +02:00
Yann Collet
d0a58163c3
added xxh3sum symlink
...
dedicated to producing and checking XXH3_* checksums.
2023-07-25 18:46:34 +02:00
Yann Collet
ffb4565b3a
add XXH3 GNU format
...
using XXH3_ prefix.
Can be used both to encode and check.
2023-07-25 03:01:02 +02:00
Yann Collet
0ac3a275c3
Merge pull request #857 from t-mat/fix/ignore-missing-manpages
...
Add --ignore-missing and --binary to --help and xxhsum.1
2023-07-12 15:26:58 -07:00
Takayuki Matsuoka
4a473192c9
Update xxhsum.1
...
Generate with the following commands:
rm cli/xxhsum.1
make man
man cli/xxhsum.1
2023-07-11 01:57:03 +09:00
Takayuki Matsuoka
c45304fb66
fix style
...
- fix style
- add --binary
2023-07-11 01:56:32 +09:00
Takayuki Matsuoka
b6103a46de
add --binary to --help message
2023-07-11 01:55:23 +09:00
Takayuki Matsuoka
e88af46329
update xxhsum.1
...
Generate with the following commands:
rm cli/xxhsum.1
make man
man cli/xxhsum.1
2023-07-11 01:21:25 +09:00
Takayuki Matsuoka
bfe162cae0
fix: add --ignore-missing to xxhsum.1.md
2023-07-11 01:19:59 +09:00
Takayuki Matsuoka
17dfca65fc
fix: add --ignore-missing to --help message
2023-07-11 01:17:51 +09:00
Takayuki Matsuoka
e592478eea
add: cli: --ignore-missing
...
- Add `--ignore-missing` option for `xxhsum`.
- Add test script `tests/cli-ignore-missing.sh` and related `Makefile` entries.
- Note that we still don't have CLI test entry in our CI.
`xxhsum` returns failure exit code when
- `--ignore-missing` is presented.
- Checksum file is specified.
- But `XSUM_checkFile()` doesn't read actual file (may) due to `--ignore-missing`
If so, `xxhsum` reports `no file was verified` with failure exit code.
<details><summary>`--ignore-missing` related code in `digest.c`</summary>
- 2f1cffe07a/src/digest.c (L190-L191)
- 2f1cffe07a/src/digest.c (L362)
- 2f1cffe07a/src/digest.c (L380)
- 2f1cffe07a/src/digest.c (L506)
- 2f1cffe07a/src/digest.c (L978-L982)
- 2f1cffe07a/src/digest.c (L1236-L1240)
- 2f1cffe07a/src/digest.c (L1325-L1328)
- 2f1cffe07a/src/digest.c (L1429-L1431)
- 2f1cffe07a/src/digest.c (L1558-L1564)
</details>
2023-07-10 17:43:40 +09:00
Yann Collet
c234b940f0
Merge pull request #825 from easyaspi314/wasm128
...
Add WebAssembly SIMD128 implementation and Node.JS support
2023-07-09 22:21:00 -07:00
Takayuki Matsuoka
d7dce1893b
feature: CLI: --binary
...
Add `--binary` to xxhsum. It's just ignored.
Note that we don't have `--text`.
See also https://github.com/Cyan4973/xxHash/issues/812
2023-07-09 22:36:02 +09:00
Yann Collet
0da2381a84
Detect and display SVE when active
...
display was mistakenly mentioning NEON instead.
Codemod inspired by @hzhuang1 's #762 .
2023-07-03 01:46:33 +02:00
Yann Collet
dfd7617268
update version number to v0.8.2
2023-06-30 03:16:09 +02:00
Takayuki Matsuoka
4823f56e1f
Fix for compiler warnings
...
Add "case GetLine_comment:" to conform -Werror=switch-enum.
```
cli/xxhsum.c: In function ‘XSUM_parseFile1’:
cli/xxhsum.c:814:17: error: enumeration value ‘GetLine_comment’ not handled in switch [-Werror=switch-enum]
814 | switch (XSUM_getLineResult)
| ^~~~~~
```
2023-06-17 20:48:12 +09:00
Takayuki Matsuoka
2f405e46bb
feature: support # comment lines in --check files
...
This change fixes issue #836 .
Basically, we just follow the following logic in the digest.c of GNU coreutils.
d53190ed46/src/digest.c (L1180-L1182)
Note that we only allow '#' at the beginning of the line.
2023-06-17 20:34:32 +09:00
easyaspi314
125f89fb51
Add node.js wasm/asm.js tests for Github CI
...
Currently only one version of EMCC, testing node 16, 17, and 18.
Cache is used because the emsdk has to cache each library which takes
a bit.
2023-03-15 01:36:23 -04:00
easyaspi314
207e2abcc9
Add some nodejs workarounds so make check works
...
- Link in `nodefs` and `noderawfs`
- Use Node's `tty.isatty()` via inline JS instead of the broken libc `isatty()`
- Used with `make NODE_JS=1`
2023-03-15 01:35:43 -04:00
Yann Collet
c9df1e26d3
Merge pull request #820 from Cyan4973/test816
...
added one test length for xxh sanity checks
2023-03-11 13:26:54 -08:00
Yann Collet
bea35c64f0
benchmark : adjust initial speed target to 10 MB/s
...
Additionally, the initial speed target can be selected at compilation time,
by setting new optional build macro XXH_1ST_SPEED_TARGET.
Solves @easyaspi314 comment in https://github.com/Cyan4973/xxHash/issues/821#issuecomment-1462961579 ,
in order to support "1.5 GHz Cortex-A53 tablet with s390x in QEMU with -O0 -mzvector"
which is very slow.
2023-03-09 17:13:22 -08:00
Yann Collet
7dd426a541
added one test length for xxh sanity checks
...
to detect off-by-one scrambling error like #816
2023-03-09 09:27:40 -08:00
Yannic Staudt
e445e5bc09
🔧 fixing https://github.com/Cyan4973/xxHash/pull/759
2022-11-10 17:17:18 +01:00
Haojian Zhuang
dde858b9a2
fix issues reported by cppcheck
...
Run command "make clean cppcheck".
---- static analyzer - cppcheck ----
cppcheck . --force --enable=warning,portability,performance,style --error-exitcode=1 > /dev/null
cli/xsum_os_specific.c:220:9: style: The scope of the variable 'ret' can be reduced. [variableScope]
int ret;
^
cli/xsum_sanity_check.c:571:19: style: Condition 'len>0' is always true [knownConditionTrueFalse]
} else if (len>0) {
^
cli/xsum_sanity_check.c:569:13: note: Assuming that condition 'len==0' is not redundant
if (len == 0) {
^
cli/xsum_sanity_check.c:571:19: note: Condition 'len>0' is always true
} else if (len>0) {
^
tests/bench/benchHash.c:112:55: error: Uninitialized variables: result.internal_never_ever_use_directly, result.error_result_never_ever_use_directly, result.error_tag_never_ever_use_directly [uninitvar]
BMK_runTime_t const runTime = BMK_extract_runTime(result);
^
tests/bench/benchHash.c:107:12: note: Assuming condition is false
while (!BMK_isCompleted_TimedFn(txf)) {
^
tests/bench/benchHash.c:107:12: note: Assuming condition is false
while (!BMK_isCompleted_TimedFn(txf)) {
^
tests/bench/benchHash.c:107:12: note: Assuming condition is false
while (!BMK_isCompleted_TimedFn(txf)) {
^
tests/bench/benchHash.c:112:55: note: Uninitialized variables: result.internal_never_ever_use_directly, result.error_result_never_ever_use_directly, result.error_tag_never_ever_use_directly
BMK_runTime_t const runTime = BMK_extract_runTime(result);
^
tests/bench/benchfn.c:95:12: error: Uninitialized variable: outcome.error_result_never_ever_use_directly [uninitvar]
return outcome;
^
tests/collisions/main.c:209:14: style: Same expression on both sides of '<='. [duplicateExpression]
assert(m <= m);
^
make: *** [Makefile:387: cppcheck] Error 1
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org >
2022-10-19 13:10:12 +08:00
Dimitri Papadopoulos
82b600a846
Fix typos found by codespell
2022-09-08 23:01:03 +02:00
Takayuki Matsuoka
02dc2abfe3
Introduce new enum AlgoBitmask to fix #724 .
...
main() introduces new variable algoBitmask which represents the algorithm(s)
which will be accepted by the CLI.
main() also sets suitable algoBitmask for exename and passes it to
XSUM_checkFiles().
The default algoBitmask is algo_bitmask_all which accepts all xxh algorithms.
XSUM_checkFiles() passes algoBitmask to XSUM_checkFile().
XSUM_checkFile() sets algoBitmask to XSUM_parseFileArg->algoBitmask and
invokes XSUM_parseFile1().
XSUM_parseFile1() passes algoBitmask to XSUM_parseLine().
XSUM_parseLine() passes algoBitmask to XSUM_parseLine1().
XSUM_parseLine1() calles XSUM_algoBitmask_Accepts() to check
actual xxh algorithm of the line and algoBitmask matches or not.
2022-07-30 04:51:39 +09:00
Yann Collet
bcc4c6a0a2
minor man page nits
2022-04-06 12:43:19 -07:00
Yann Collet
9244d6e1a9
Merge pull request #696 from Begasus/haiku
...
Build fix for Haiku
2022-04-06 06:51:38 -07:00
Takayuki Matsuoka
bd4ded94ee
Introduce md5sum style filename escape convention
...
For details, see issue #695 .
If filename contains special character (\n, 0x0a, LF),
- Put '\' (0x5c) at the beginning of the line.
- Escape special character by '\'.
2022-04-04 19:52:50 +09:00
begasus
8b86185357
Build fix for Haiku
2022-03-29 10:46:14 +02:00
Yannic Staudt
81972bf476
Added tipi.build support and instructions to xxHash (incl. ci build)
2022-03-09 18:01:45 +01:00
Yann Collet
8e5afc71b3
fixed minor warnings
2021-12-11 10:28:20 -08:00
Yann Collet
f035303b8a
updated copyright years
2021-12-08 11:04:22 -08:00
Yann Collet
836f4e735c
fix man page installation
...
for variant redirectors (`xxh32sum`, `xxh64sum` and `xxh128sum`).
fix #647 , reported by @jpalus.
Also : slightly updated man page text, for clarity and accuracy.
2021-12-04 10:29:49 -08:00
easyaspi314 (Devin)
2e7af136e2
Fix CLI detection for Windows ARM and ARM64EC
...
Not that you would get an ARMv7 binary to run in cmd but it fixes
it nonetheless.
2021-11-30 01:38:35 -05:00
Yann Collet
c7ed8b54c2
activate _dispatch() (when enabled) in benchmark mode
2021-11-29 10:31:59 -08:00
Yann Collet
a0e9159bdc
more generator tests
...
with multiple secret lengths
2021-11-28 20:17:57 -08:00
Yann Collet
6eb4e03b3e
XXH3_generateSecret() can now generate secret of any size
...
as long as it's >= XX3_SECRET_SIZE_MIN .
Note that results produced by this version
are not comparable to results produced by earlier version.
XXH3_generateSecret() is still considered experimental,
aka, its result is not yet guaranteed to remain stable across versions.
2021-11-28 20:01:46 -08:00
Yann Collet
079d6bba3b
updated man page
2021-11-28 17:36:55 -08:00
Yann Collet
d14507f4ad
updated documentation for -H3
2021-11-28 17:35:46 -08:00
Yann Collet
35cc12401c
more thorough format validation with --check
...
in --tag mode, will detect mismatch between algo name and algo width.
2021-11-28 17:14:34 -08:00