Add new DCtx param: validateChecksum and update unit tests
This commit is contained in:
+5
-4
@@ -261,11 +261,12 @@ zstd tmp -c --compress-literals -19 | zstd -t
|
||||
zstd -b --fast=1 -i0e1 tmp --compress-literals
|
||||
zstd -b --fast=1 -i0e1 tmp --no-compress-literals
|
||||
println "test: --no-check for decompression"
|
||||
zstd -f tmp -o tmp.zst --check
|
||||
zstd -f tmp -o tmp1.zst --no-check
|
||||
printf '\xDE\xAD\xBE\xEF' | dd of=tmp.zst bs=1 seek=$(($(wc -c <"tmp.zst") - 4)) count=4 conv=notrunc # corrupt checksum in tmp
|
||||
zstd -f tmp -o tmp_corrupt.zst --check
|
||||
zstd -f tmp -o tmp.zst --no-check
|
||||
printf '\xDE\xAD\xBE\xEF' | dd of=tmp_corrupt.zst bs=1 seek=$(($(wc -c < "tmp_corrupt.zst") - 4)) count=4 conv=notrunc # corrupt checksum in tmp
|
||||
zstd -d -f tmp_corrupt.zst --no-check
|
||||
zstd -d -f tmp_corrupt.zst --check --no-check # final flag overrides
|
||||
zstd -d -f tmp.zst --no-check
|
||||
zstd -d -f tmp1.zst --no-check
|
||||
|
||||
println "\n===> zstdgrep tests"
|
||||
ln -sf "$ZSTD_BIN" zstdcat
|
||||
|
||||
Reference in New Issue
Block a user