1.22: zcat does not decompress data anymore [bisected]

Michael Tokarev mjt at tls.msk.ru
Tue Jan 28 08:48:08 UTC 2014


Since this commit:

commit 41655438c6b61d05ddf3619f31abc1fa3583e2be
Author: Denys Vlasenko <vda.linux at googlemail.com>
Date:   Thu Feb 28 18:37:04 2013 +0100

    zcat: fix "zcat FILE" trying to do detection twice

busybox's zcat does not decompress files without .gz
extension anymore:

 $ gzip < README > x
 $ ./busybox zcat x | wc -c

-- before the above commit, it will uncompress the data fine,
yelding the size of original README file (8763 bytes).  But
after this commit, it emits compressed data (effectively just
copies content of the input file), of size 3985 bytes.


I was about to submit this as a bugreport, but took a look at
the current git tree, and noticed that apparently, this issue
has already been fixed by the following two commits:

commit	7c47b560a8fc97956dd8132bd7f1863d83c19866 (patch)
libarchive: open_zipped() does not need to check extensions for e.g. gzip
We only need to check for signature-less extensions, currently only .lzma. The rest can be happily autodetected. This fixes "zcat FILE_WITHOUT_GZ_EXT" case, among others.

commit	b664f740d90880560ce46b11f766625341342e80 (patch)
busybox-b664f740d90880560ce46b11f766625341342e80.tar.bz2
libbb: open_zipped() should not fail on non-compressed files


So it looks like the two commits are good candidates for 1.21.


Thanks,

/mjt


More information about the busybox mailing list