summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorThiago Jung Bauermann2015-05-03 18:40:12 +0200
committerDenys Vlasenko2015-05-03 18:40:12 +0200
commitb4059f6309c5129a619bd1a95d27919231e07860 (patch)
treee76971976b5b90b1643d98d2512f430186c81da5 /archival
parentc77a58fb2d84d4ee3883d385bc44bbfcfc7093c9 (diff)
downloadbusybox-b4059f6309c5129a619bd1a95d27919231e07860.zip
busybox-b4059f6309c5129a619bd1a95d27919231e07860.tar.gz
libarchive: auto-detect .Z files as well
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r--archival/libarchive/open_transformer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/archival/libarchive/open_transformer.c b/archival/libarchive/open_transformer.c
index ab6aa3a..be536a3 100644
--- a/archival/libarchive/open_transformer.c
+++ b/archival/libarchive/open_transformer.c
@@ -185,6 +185,13 @@ static transformer_state_t *setup_transformer_on_fd(int fd, int fail_if_not_comp
USE_FOR_NOMMU(xstate->xformer_prog = "gunzip";)
goto found_magic;
}
+ if (ENABLE_FEATURE_SEAMLESS_Z
+ && magic.b16[0] == COMPRESS_MAGIC
+ ) {
+ xstate->xformer = unpack_Z_stream;
+ USE_FOR_NOMMU(xstate->xformer_prog = "uncompress";)
+ goto found_magic;
+ }
if (ENABLE_FEATURE_SEAMLESS_BZ2
&& magic.b16[0] == BZIP2_MAGIC
) {