Support .zstd suffix only for decompression
This commit is contained in:
parent
05622992d5
commit
6b6cc80196
1
.gitignore
vendored
1
.gitignore
vendored
@ -23,6 +23,7 @@ zstdmt
|
|||||||
# Test artefacts
|
# Test artefacts
|
||||||
tmp*
|
tmp*
|
||||||
*.zst
|
*.zst
|
||||||
|
*.zstd
|
||||||
dictionary.
|
dictionary.
|
||||||
dictionary
|
dictionary
|
||||||
NUL
|
NUL
|
||||||
|
@ -2555,6 +2555,9 @@ int FIO_decompressFilename(FIO_ctx_t* const fCtx, FIO_prefs_t* const prefs,
|
|||||||
static const char *suffixList[] = {
|
static const char *suffixList[] = {
|
||||||
ZSTD_EXTENSION,
|
ZSTD_EXTENSION,
|
||||||
TZSTD_EXTENSION,
|
TZSTD_EXTENSION,
|
||||||
|
#ifndef ZSTD_NODECOMPRESS
|
||||||
|
ZSTD_ALT_EXTENSION,
|
||||||
|
#endif
|
||||||
#ifdef ZSTD_GZDECOMPRESS
|
#ifdef ZSTD_GZDECOMPRESS
|
||||||
GZ_EXTENSION,
|
GZ_EXTENSION,
|
||||||
TGZ_EXTENSION,
|
TGZ_EXTENSION,
|
||||||
|
@ -44,6 +44,7 @@ extern "C" {
|
|||||||
|
|
||||||
#define ZSTD_EXTENSION ".zst"
|
#define ZSTD_EXTENSION ".zst"
|
||||||
#define TZSTD_EXTENSION ".tzst"
|
#define TZSTD_EXTENSION ".tzst"
|
||||||
|
#define ZSTD_ALT_EXTENSION ".zstd" /* allow decompression of .zstd files */
|
||||||
|
|
||||||
#define LZ4_EXTENSION ".lz4"
|
#define LZ4_EXTENSION ".lz4"
|
||||||
#define TLZ4_EXTENSION ".tlz4"
|
#define TLZ4_EXTENSION ".tlz4"
|
||||||
|
@ -1128,10 +1128,13 @@ if [ $LZ4MODE -ne 1 ]; then
|
|||||||
grep ".lz4" tmplg > $INTOVOID && die "Unsupported suffix listed"
|
grep ".lz4" tmplg > $INTOVOID && die "Unsupported suffix listed"
|
||||||
fi
|
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 "
|
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
|
datagen > tmp
|
||||||
tar cf tmp.tar tmp
|
tar cf tmp.tar tmp
|
||||||
|
Loading…
Reference in New Issue
Block a user