diff --git a/.gitignore b/.gitignore index 6188ab91..ae277e93 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ zstdmt # Test artefacts tmp* *.zst +*.zstd dictionary. dictionary NUL diff --git a/programs/fileio.c b/programs/fileio.c index b27f314a..1f2dabf4 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -2555,6 +2555,9 @@ int FIO_decompressFilename(FIO_ctx_t* const fCtx, FIO_prefs_t* const prefs, static const char *suffixList[] = { ZSTD_EXTENSION, TZSTD_EXTENSION, +#ifndef ZSTD_NODECOMPRESS + ZSTD_ALT_EXTENSION, +#endif #ifdef ZSTD_GZDECOMPRESS GZ_EXTENSION, TGZ_EXTENSION, diff --git a/programs/fileio.h b/programs/fileio.h index bec651a1..1a0a35de 100644 --- a/programs/fileio.h +++ b/programs/fileio.h @@ -44,6 +44,7 @@ extern "C" { #define ZSTD_EXTENSION ".zst" #define TZSTD_EXTENSION ".tzst" +#define ZSTD_ALT_EXTENSION ".zstd" /* allow decompression of .zstd files */ #define LZ4_EXTENSION ".lz4" #define TLZ4_EXTENSION ".tlz4" diff --git a/tests/playTests.sh b/tests/playTests.sh index d9407db8..72a02918 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -1128,10 +1128,13 @@ if [ $LZ4MODE -ne 1 ]; then grep ".lz4" tmplg > $INTOVOID && die "Unsupported suffix listed" fi +touch tmp1 +zstd tmp1 -o tmp1.zstd +zstd -d tmp1.zstd # support .zstd suffix even though it's not the default suffix println "\n===> tar extension tests " -rm -f tmp tmp.tar tmp.tzst tmp.tgz tmp.txz tmp.tlz4 +rm -f tmp tmp.tar tmp.tzst tmp.tgz tmp.txz tmp.tlz4 tmp1.zstd datagen > tmp tar cf tmp.tar tmp