From b4059f6309c5129a619bd1a95d27919231e07860 Mon Sep 17 00:00:00 2001 From: Thiago Jung Bauermann Date: Sun, 3 May 2015 18:40:12 +0200 Subject: libarchive: auto-detect .Z files as well Signed-off-by: Thiago Jung Bauermann Signed-off-by: Denys Vlasenko --- archival/libarchive/open_transformer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'archival/libarchive') diff --git a/archival/libarchive/open_transformer.c b/archival/libarchive/open_transformer.c index ab6aa3afc..be536a3d7 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 ) { -- cgit v1.2.3