Lines Matching full:tmp
70 rm -f tmp.zst tmp.md5.1 tmp.md5.2
71 … println "fileRoundTripTest: datagen $1 $local_p > tmp && zstd -v$local_c -c tmp | zstd -d$local_d"
72 datagen $1 $local_p > tmp
73 < tmp $MD5SUM > tmp.md5.1
74 zstd --ultra -v$local_c -c tmp | zstd -d$local_d | $MD5SUM > tmp.md5.2
75 $DIFF -q tmp.md5.1 tmp.md5.2
194 datagen > tmp
199 zstd -f tmp # trivial compression case, creates tmp.zst
200 zstd -f -z tmp
201 zstd -f -k tmp
202 zstd -f -C tmp
204 zstd -df tmp.zst # trivial decompression case (overwrites tmp)
206 zstd -99 -f tmp # too large compression level, automatic sized down
207 zstd -5000000000 -f tmp && die "too large numeric value : must fail"
209 zstd --fast -f tmp # == -1
210 zstd --fast=3 -f tmp # == -3
211 zstd --fast=200000 -f tmp # too low compression level, automatic fixed
212 zstd --fast=5000000000 -f tmp && die "too large numeric value : must fail"
213 zstd -c --fast=0 tmp > $INTOVOID && die "--fast must not accept value 0"
215 zstd --fast=9999999999 -f tmp && die "should have refused numeric value"
218 ZSTD_CLEVEL=12 zstd -f tmp # positive compression level
219 ZSTD_CLEVEL=-12 zstd -f tmp # negative compression level
220 ZSTD_CLEVEL=+12 zstd -f tmp # valid: verbose '+' sign
221 ZSTD_CLEVEL='' zstd -f tmp # empty env var, warn and revert to default setting
222 ZSTD_CLEVEL=- zstd -f tmp # malformed env var, warn and revert to default setting
223 ZSTD_CLEVEL=a zstd -f tmp # malformed env var, warn and revert to default setting
224 ZSTD_CLEVEL=+a zstd -f tmp # malformed env var, warn and revert to default setting
225 ZSTD_CLEVEL=3a7 zstd -f tmp # malformed env var, warn and revert to default setting
226 ZSTD_CLEVEL=50000000000 zstd -f tmp # numeric value too large, warn and revert to default setting
228 ZSTD_CLEVEL=12 zstd --fast=3 -f tmp # overridden by command line option
235 zstd tmp -c > tmpCompressed
236 zstd tmp --stdout > tmpCompressed # long command format
240 zstd tmp -o tmpCompressed
244 zstd tmp -fo tmpCompressed
248 zstd tmp -c > tmpCompressed -o tmpOut
251 zstd tmp -o tmpOut -c > tmpCompressed
255 cp tmp tmp2
273 zstd -df tmp && die "should have refused : wrong extension"
279 zstd -dc < tmp.zst > $INTOVOID # combine decompression, stdin & stdout
280 zstd -dc - < tmp.zst > $INTOVOID
281 zstd -d < tmp.zst > $INTOVOID # implicit stdout when stdin is used
282 zstd -d - < tmp.zst > $INTOVOID
292 zstd -q tmp && die "overwrite check failed!"
294 zstd -q -f tmp
295 zstd -q --force tmp
312 zstd tmp -fo tmp && die "zstd compression overwrote the input file"
313 zstd tmp.zst -dfo tmp.zst && die "zstd decompression overwrote the input file"
317 zstd tmp -c --no-compress-literals -1 | zstd -t
318 zstd tmp -c --no-compress-literals --fast=1 | zstd -t
319 zstd tmp -c --no-compress-literals -19 | zstd -t
320 zstd tmp -c --compress-literals -1 | zstd -t
321 zstd tmp -c --compress-literals --fast=1 | zstd -t
322 zstd tmp -c --compress-literals -19 | zstd -t
323 zstd -b --fast=1 -i0e1 tmp --compress-literals
324 zstd -b --fast=1 -i0e1 tmp --no-compress-literals
326 zstd -f tmp -o tmp_corrupt.zst --check
327 zstd -f tmp -o tmp.zst --no-check
328 ….zst bs=1 seek=$(($(wc -c < "tmp_corrupt.zst") - 4)) count=4 conv=notrunc # corrupt checksum in tmp
331 zstd -d -f tmp.zst --no-check
342 datagen > tmp
344 zstd --fast --single-thread tmp -o tmpMT0
346 zstd --fast -T1 tmp -o tmpMT1
348 zstd --fast -T2 tmp -o tmpMT2
350 zstd --fast -T16 tmp -o tmpMT3
352 zstd --fast -T127 tmp -o tmpMT4
354 zstd --fast -T128 tmp -o tmpMT5
356 zstd --fast -4294967295 tmp -o tmpMT6
358 zstd --fast -4294967296 tmp -o tmptest9 && die "max allowed numeric value is 4294967295"
360 datagen > tmp
362 zstd -f tmp # trivial compression case, creates tmp.zst
364 zstd -d -f -T1 tmp.zst
369 datagen > tmp
371 zstd -f tmp # trivial compression case, creates tmp.zst
373 zstd --fast=1 -f tmp
375 zstd --fast=99 -f tmp
377 zstd --fast=-1 -f tmp && die "error: Invalid value -- negative number"
379 zstd --fast=0 -f tmp && die "error: Invalid value -- 0 number"
381 zstd --fast=4294967295 -f tmp
383 zstd --fast=4294967296 -f tmp && die "max allowed argument of --fast is 4294967295"
449 zstd -c -r < tmp > tmp.zst
458 zstd -f --rm tmp
459 test ! -f tmp # tmp should no longer be present
460 zstd -f -d --rm tmp.zst
461 test ! -f tmp.zst # tmp.zst should no longer be present
463 test -f tmp
464 zstd --rm tmp -c > $INTOVOID
465 test -f tmp # tmp shall still be there
466 zstd --rm tmp --stdout > $INTOVOID
467 test -f tmp # tmp shall still be there
468 zstd -f --rm tmp -c > $INTOVOID
469 test -f tmp # tmp shall still be there
470 zstd -f tmp -c > $INTOVOID --rm
471 test -f tmp # tmp shall still be there
473 cp tmp tmp2
474 zstd --rm tmp tmp2 -c > $INTOVOID
475 test -f tmp
478 echo 'y' | zstd -v tmp tmp2 -o tmp3.zst --rm # prompt for confirmation
479 test -f tmp
481 zstd -f tmp tmp2 -o tmp3.zst --rm # just warns, no prompt
482 test -f tmp
484 zstd -q tmp tmp2 -o tmp3.zst --rm && die "should refuse to concatenate"
492 cp tmp tmp2
497 cp tmp tmp2
502 println hello > tmp
503 zstd tmp -f -o "$DEVDEVICE" 2>tmplog > "$INTOVOID"
506 zstd tmp -f -o "$INTOVOID" 2>&1 | $GREP "Refusing to remove non-regular file" && die
509 rm -f tmp
510 zstd -f tmp && die "tmp not present : should have failed"
511 test ! -f tmp.zst # tmp.zst should not be created
513 touch tmp # create destination file
514 zstd -d -f tmp.zst && die "attempt to decompress a non existing file"
515 test -f tmp # destination file should still be present
517 rm -f tmp # erase source file
518 touch tmp.zst # create destination file
519 zstd -f tmp && die "attempt to compress a non existing file"
520 test -f tmp.zst # destination file should still be present
521 rm -rf tmp* # may also erase tmp* directory from previous failed run
528 dd bs=1048576 count=1 if=/dev/zero of=tmp
530 $DIFF -s tmp1 tmp
540 rm -f tmp*
547 echo 'y' | zstd -v tmp1 tmp2 -o tmp.zst
554 echo 'y' | zstd -v -d tmp1.zst tmp2.zst -o tmp
580 println "compress tmp* : "
581 zstd -f tmp*
586 println "decompress tmp* : "
591 println "compress tmp* into stdout > tmpall : "
600 rm -f tmp*
612 rm -rf tmp*
700 datagen > tmp
701 sudoZstd tmp -o $INTOVOID # sudo rights could modify /dev/null permissions
702 sudoZstd tmp -c > $INTOVOID
703 zstd tmp -f -o tmp.zst
704 sudoZstd -d tmp.zst -c > $INTOVOID
705 sudoZstd -d tmp.zst -o $INTOVOID
714 datagen -g65536 > tmp.img
715 sudo losetup -fP tmp.img
716 LOOP_DEV=$(losetup -a | $GREP 'tmp\.img' | cut -f1 -d:)
718 sudoZstd $LOOP_DEV -c > tmp.img.zst && die "should fail without -f"
719 sudoZstd -f $LOOP_DEV -c > tmp.img.zst
720 zstd -d tmp.img.zst -o tmp.img.copy
722 $DIFF -s tmp.img tmp.img.copy || die "round trip failed"
723 rm -f tmp.img tmp.img.zst tmp.img.copy
727 datagen > tmp
728 touch -m -t 200001010000.00 tmp
730 zstd -f tmp -o tmp.zst
731 assertSameMTime tmp tmp.zst
733 zstd -f -d tmp.zst -o tmp.out
734 assertSameMTime tmp.zst tmp.out
735 rm -f tmp
758 rm -rf tmp*
788 rm -rf tmp*
857 ls tmp* > tmpList
859 rm -rf tmp*
872 rm -rf tmp*
875 datagen > tmp
876 zstd --show-default-cparams -f tmp
877 zstd --show-default-cparams -d tmp.zst && die "error: can't use --show-default-cparams in decompres…
878 rm -rf tmp*
886 rm -rf tmp*
889 datagen > tmp
890 zstd -vv tmp 2>&1 | \
892 rm -rf tmp*
895 println "Hello world!" | zstd --zstd=windowLog=21, - -o tmp.zst && die "wrong parameters not d…
896 println "Hello world!" | zstd --zstd=windowLo=21 - -o tmp.zst && die "wrong parameters not d…
897 println "Hello world!" | zstd --zstd=windowLog=21,slog - -o tmp.zst && die "wrong parameters not d…
898 println "Hello world!" | zstd --zstd=strategy=10 - -o tmp.zst && die "parameter out of bound…
899 test ! -f tmp.zst # tmp.zst should not be created
923 rm -rf tmp*
927 println "hello " > hello.tmp
928 println "world!" > world.tmp
929 cat hello.tmp world.tmp > helloworld.tmp
930 zstd -c hello.tmp > hello.zst
931 zstd -c world.tmp > world.zst
932 zstd -c hello.tmp world.tmp > helloworld.zst
933 zstd -dc helloworld.zst > result.tmp
934 $DIFF helloworld.tmp result.tmp
936 zstd -dc helloworld.zst > result.tmp
937 cat result.tmp
938 $DIFF helloworld.tmp result.tmp
940 zstd -c hello.tmp > hello.zst --no-check
941 zstd -c world.tmp > world.zst --no-check
943 zstd -dc helloworld.zst > result.tmp
944 $DIFF helloworld.tmp result.tmp
947 $EXE_PREFIX ./zstdcat helloworld.zst > result.tmp
948 $DIFF helloworld.tmp result.tmp
950 $EXE_PREFIX ./zstdcat helloworld.link.zst > result.tmp
951 $DIFF helloworld.tmp result.tmp
953 rm -f result.tmp
956 $EXE_PREFIX ./zcat helloworld.zst > result.tmp
957 $DIFF helloworld.tmp result.tmp
958 $EXE_PREFIX ./zcat helloworld.link.zst > result.tmp
959 $DIFF helloworld.tmp result.tmp
961 rm -f ./*.tmp ./*.zstd
980 rm -f hello.tmp world.tmp world2.tmp hello.tmp.zst world.tmp.zst
981 println "hello world" > hello.tmp
982 ln -s hello.tmp world.tmp
983 ln -s hello.tmp world2.tmp
984 zstd world.tmp hello.tmp || true
985 test -f hello.tmp.zst # regular file should have been compressed!
986 test ! -f world.tmp.zst # symbolic link should not have been compressed!
987 zstd world.tmp || true
988 test ! -f world.tmp.zst # symbolic link should not have been compressed!
989 zstd world.tmp world2.tmp || true
990 test ! -f world.tmp.zst # symbolic link should not have been compressed!
991 test ! -f world2.tmp.zst # symbolic link should not have been compressed!
992 zstd world.tmp hello.tmp -f
993 test -f world.tmp.zst # symbolic link should have been compressed with --force
994 rm -f hello.tmp world.tmp world2.tmp hello.tmp.zst world.tmp.zst
1028 datagen -g11000 > tmp
1030 file_size=$(zstd -14 -f tmp -o tmp.zst && wc -c < tmp.zst)
1031 stream_size=$(cat tmp | zstd -14 --stream-size=11000 | wc -c)
1036 cat tmp | zstd -14 -f tmp -o tmp.zst --stream-size=11000
1037 zstd -df tmp.zst -o tmp_decompress
1038 cmp tmp tmp_decompress || die "difference between original and decompressed file"
1040 cat tmp | zstd -14 -f -o tmp.zst --stream-size=11001 && die "should fail with incorrect stream size"
1043 rm -f tmp*
1048 rm -rf tmp*
1051 rm -f tmp*
1057 rm -rf tmp*
1061 datagen -g11000 > tmp
1065 file_size=$(zstd -14 -f tmp -o tmp.zst && wc -c < tmp.zst)
1066 stream_size=$(cat tmp | zstd -14 --size-hint=11000 | wc -c)
1071 cat tmp | zstd -14 -f -o tmp.zst --size-hint=11000
1072 zstd -df tmp.zst -o tmp_decompress
1073 cmp tmp tmp_decompress || die "difference between original and decompressed file"
1075 cat tmp | zstd -14 -f -D tmpDict --size-hint=11000 | zstd -t -D tmpDict
1077 zstd -14 -f -D tmpDict --size-hint=11000 tmp tmp2
1078 zstd -14 -f -o tmp1_.zst -D tmpDict --size-hint=11000 tmp
1080 cmp tmp.zst tmp1_.zst || die "first file's output differs"
1083 cat tmp | zstd -14 -f --size-hint=11050 | zstd -t # slightly too high
1084 cat tmp | zstd -14 -f --size-hint=10950 | zstd -t # slightly too low
1085 cat tmp | zstd -14 -f --size-hint=22000 | zstd -t # considerably too high
1086 cat tmp | zstd -14 -f --size-hint=5500 | zstd -t # considerably too low
1088 cat tmp | zstd -14 -f --size-hint=11K | zstd -t
1089 cat tmp | zstd -14 -f --size-hint=11KB | zstd -t
1090 cat tmp | zstd -14 -f --size-hint=11KiB | zstd -t
1091 cat tmp | zstd -14 -f --size-hint=1M | zstd -t
1092 cat tmp | zstd -14 -f --size-hint=1MB | zstd -t
1093 cat tmp | zstd -14 -f --size-hint=1MiB | zstd -t
1111 cp "$TESTFILE" tmp
1115 zstd -f tmp -D tmpDict
1116 zstd -d tmp.zst -D tmpDict -fo result
1119 zstd -6f tmp -D tmpDict --zstd=clog=25,hlog=23
1121 zstd -f tmp -D tmpDict --zstd=strategy=6
1122 zstd -d tmp.zst -D tmpDict -fo result
1126 cat tmpDict | zstd -f tmp -D /proc/self/fd/0 && die "Piped dictionary should fail!"
1127 cat tmpDict | zstd -d tmp.zst -D /proc/self/fd/0 -f && die "Piped dictionary should fail!"
1136 zstd -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!"
1149 zstd -f tmp -D tmpDict1 --no-dictID
1150 zstd -d tmp.zst -D tmpDict -fo result
1167 println "Hello World" > tmp
1168 zstd --train-legacy -q tmp && die "Dictionary training should fail : not enough input source"
1169 datagen -P0 -g10M > tmp
1170 zstd --train-legacy -q tmp && die "Dictionary training should fail : source is pure noise"
1182 rm -f tmp* dictionary
1197 cp "$TESTFILE" tmp
1198 zstd -f tmp -D tmpDict
1199 zstd -d tmp.zst -D tmpDict -fo result
1203 zstd -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!"
1232 rm -f tmp* dictionary
1241 cp "$TESTFILE" tmp
1242 zstd -f tmp -D tmpDict
1243 zstd -d tmp.zst -D tmpDict -fo result
1248 zstd -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!"
1260 rm -f tmp* dictionary
1324 datagen > tmp
1325 rm -f tmp.zst
1326 zstd --format=zstd -f tmp
1327 test -f tmp.zst
1339 datagen > tmp
1340 zstd --format=gzip -f tmp
1341 gzip -t -v tmp.gz
1342 gzip -f tmp
1343 zstd -d -f -v tmp.gz
1344 rm -f tmp*
1356 datagen > tmp
1357 zstd -f --format=gzip tmp
1358 zstd -f tmp
1359 cat tmp.gz tmp.zst tmp.gz tmp.zst | zstd -d -f -o tmp
1360 truncateLastByte tmp.gz | zstd -t > $INTOVOID && die "incomplete frame not detected !"
1361 rm -f tmp*
1367 datagen > tmp
1368 rm -f tmp.zst
1369 zstd --format=gzip --format=zstd -f tmp
1370 test -f tmp.zst
1383 datagen > tmp
1384 zstd --format=lzma -f tmp
1385 zstd --format=xz -f tmp
1386 xz -Q -t -v tmp.xz
1387 xz -Q -t -v tmp.lzma
1388 xz -Q -f -k tmp
1389 lzma -Q -f -k --lzma1 tmp
1390 zstd -d -f -v tmp.xz
1391 zstd -d -f -v tmp.lzma
1392 rm -f tmp*
1399 datagen > tmp
1400 ./xz tmp
1401 xz -Q -d tmp.xz
1402 ./lzma tmp
1403 lzma -Q -d tmp.lzma
1405 xz -Q tmp
1406 ./xz -d tmp.xz
1407 lzma -Q tmp
1408 ./lzma -d tmp.lzma
1410 rm -f tmp*
1422 datagen > tmp
1423 zstd -f --format=xz tmp
1424 zstd -f --format=lzma tmp
1425 zstd -f tmp
1426 cat tmp.xz tmp.lzma tmp.zst tmp.lzma tmp.xz tmp.zst | zstd -d -f -o tmp
1427 truncateLastByte tmp.xz | zstd -t > $INTOVOID && die "incomplete frame not detected !"
1428 truncateLastByte tmp.lzma | zstd -t > $INTOVOID && die "incomplete frame not detected !"
1429 rm -f tmp*
1443 datagen > tmp
1444 zstd --format=lz4 -f tmp
1445 lz4 -t -v tmp.lz4
1446 lz4 -f -m tmp # ensure result is sent into tmp.lz4, not stdout
1447 zstd -d -f -v tmp.lz4
1448 rm -f tmp*
1459 datagen > tmp
1460 zstd -f --format=lz4 tmp
1461 zstd -f tmp
1462 cat tmp.lz4 tmp.zst tmp.lz4 tmp.zst | zstd -d -f -o tmp
1463 truncateLastByte tmp.lz4 | zstd -t > $INTOVOID && die "incomplete frame not detected !"
1464 rm -f tmp*
1472 ! zstd -d tmp.abc 2> tmplg
1493 rm -f tmp tmp.tar tmp.tzst tmp.tgz tmp.txz tmp.tlz4 tmp1.zstd
1495 datagen > tmp
1496 tar -cf tmp.tar tmp
1497 zstd tmp.tar -o tmp.tzst
1498 rm -f tmp.tar
1499 zstd -d tmp.tzst
1500 [ -e tmp.tar ] || die ".tzst failed to decompress to .tar!"
1501 rm -f tmp.tar tmp.tzst
1504 tar -f - -c tmp | gzip > tmp.tgz
1505 zstd -d tmp.tgz
1506 [ -e tmp.tar ] || die ".tgz failed to decompress to .tar!"
1507 rm -f tmp.tar tmp.tgz
1511 tar -f - -c tmp | zstd --format=xz > tmp.txz
1512 zstd -d tmp.txz
1513 [ -e tmp.tar ] || die ".txz failed to decompress to .tar!"
1514 rm -f tmp.tar tmp.txz
1518 tar -f - -c tmp | zstd --format=lz4 > tmp.tlz4
1519 zstd -d tmp.tlz4
1520 [ -e tmp.tar ] || die ".tlz4 failed to decompress to .tar!"
1521 rm -f tmp.tar tmp.tlz4
1524 touch tmp.t tmp.tz tmp.tzs
1525 ! zstd -d tmp.t
1526 ! zstd -d tmp.tz
1527 ! zstd -d tmp.tzs
1584 datagen -g2MB > tmp
1585 refSize=$(zstd tmp -6 -c --zstd=wlog=18 | wc -c)
1586 ov9Size=$(zstd tmp -6 -c --zstd=wlog=18,ovlog=9 | wc -c)
1587 ov1Size=$(zstd tmp -6 -c --zstd=wlog=18,ovlog=1 | wc -c)
1605 rm -f tmp*
1611 zstd tmp*
1625 zstd --list tmp* && die "-l must fail on non-zstd file"
1670 zstd -f --trace tmp.trace tmp1
1671 zstd -f --trace tmp.trace tmp1 tmp2 tmp3
1672 zstd -f --trace tmp.trace tmp1 tmp2 tmp3 -o /dev/null
1673 zstd -f --trace tmp.trace tmp1 tmp2 tmp3 --single-thread
1674 zstd -f --trace tmp.trace -D tmp1 tmp2 tmp3 -o /dev/null
1675 zstd -f --trace tmp.trace -D tmp1 tmp2 tmp3 -o /dev/null --single-thread
1676 zstd --trace tmp.trace -t tmp1.zst
1677 zstd --trace tmp.trace -t tmp1.zst tmp2.zst
1678 zstd -f --trace tmp.trace -d tmp1.zst
1679 zstd -f --trace tmp.trace -d tmp1.zst tmp2.zst tmp3.zst
1680 zstd -D tmp1 tmp2 -c | zstd --trace tmp.trace -t -D tmp1
1681 zstd -b1e10i0 --trace tmp.trace tmp1
1682 zstd -b1e10i0 --trace tmp.trace tmp1 tmp2 tmp3
1684 rm -f tmp*
1772 datagen > tmp
1773 zstd --adapt= tmp && die "invalid compression parameter"
1774 zstd -f -vv --adapt=min=10,max=9 tmp && die "--adapt must fail on incoherent bounds"
1780 zstd -f -vv --rsyncable --single-thread tmp && die "--rsyncable must fail with --single-thread"
1802 rm -rf tmp*
1814 rm -rf tmp*
1822 rm -rf tmp*
1829 rm -rf tmp*
1896 cp "$TESTFILE" tmp
1897 zstd -f tmp -D tmpDict
1898 zstd -f tmp -D tmpDict --patch-from=tmpDict && die "error: can't use -D and --patch-from=#at the sa…
1899 zstd -d tmp.zst -D tmpDict -fo result
1904 zstd -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!"
1926 rm -f tmp* dictionary
1928 rm -f tmp*