aboutsummaryrefslogtreecommitdiff
path: root/archival/bbunzip.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'busybox' into mergeRon Yorston2016-07-071-1/+1
|\
| * libarchive: fix xmalloc_open_zipped_read_close() on NOMMUDenys Vlasenko2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | The somewhat new "unpack in memory" code was broken for xmalloc_open_zipped_read_close() on NOMMU: we seek back over signature, but then expect it to be already consumed. Stop seeking back in this case. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2015-10-311-1/+22
|\|
| * gzip: add support for --no-name long optionAaro Koskinen2015-10-271-0/+1
| | | | | | | | | | | | | | | | | | | | Add support for --no-name long option. Just silently ignore it like the short -n option. This allows to use busybox gzip with Lynx browser. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gunzip: add support for long optionsAaro Koskinen2015-10-271-0/+20
| | | | | | | | | | | | | | Add support for long options. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tweak defconfigDenys Vlasenko2015-10-251-1/+1
| | | | | | | | | | | | | | | | MONOTONIC_SYSCALL=y by default FEATURE_LAST_SMALL is gone: now FEATURE_LAST_FANCY is a "bool", not a "choice". Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-12-141-37/+14
|\| | | | | | | | | | | | | Conflicts: archival/libarchive/open_transformer.c libbb/lineedit.c miscutils/man.c
| * libarchive: add capability to unpack to mem.bufferDenys Vlasenko2014-12-071-30/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The performance and number of processes for a "depmod -a" with gzipped modules was abysmal. This patch adds a code path without fork, benefiting all users of xmalloc_open_zipped_read_close. "modinfo radeon.ko.gz", a single-file reader, got 30% faster. "depmod -a", which used to fork over 800 times, got 20% faster. Heavily based on a patch by Lauri Kasanen <curaga@operamail.com> function old new delta setup_transformer_on_fd - 159 +159 transformer_write - 122 +122 fork_transformer - 112 +112 xmalloc_open_zipped_read_close 63 118 +55 read_bunzip 1866 1896 +30 xtransformer_write - 19 +19 unzip_main 2449 2462 +13 bbunpack 755 766 +11 unpack_lzma_stream 2717 2723 +6 unpack_xz_stream 2393 2397 +4 unpack_Z_stream 1173 1175 +2 inflate_unzip 111 105 -6 check_signature16 70 63 -7 unpack_bz2_stream 359 349 -10 unpack_unxz 12 - -12 unpack_unlzma 12 - -12 unpack_uncompress 12 - -12 unpack_gunzip 12 - -12 unpack_bunzip2 12 - -12 open_transformer 106 92 -14 inflate_unzip_internal 1945 1916 -29 unpack_gz_stream 693 655 -38 open_zipped 89 47 -42 setup_unzip_on_fd 142 53 -89 ------------------------------------------------------------------------------ (add/remove: 4/5 grow/shrink: 7/8 up/down: 533/-295) Total: 238 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Rename transformer_aux_data_t -> transformer_state_tDenys Vlasenko2014-12-071-17/+17
| | | | | | | | | | | | No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-03-111-2/+3
|\|
| * zcat: complain if input is not compressedDenys Vlasenko2014-02-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta buffer_fill_and_print 178 191 +13 varvalue 735 743 +8 bbunpack 747 755 +8 open_zipped 85 89 +4 xmalloc_open_zipped_read_close 61 63 +2 get_addr_1 240 242 +2 fbsplash_main 1228 1230 +2 pstree_main 322 321 -1 builtin_type 121 119 -2 do_load 954 926 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/3 up/down: 39/-31) Total: 8 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-01-021-6/+90
|\| | | | | | | | | | | Conflicts: archival/Config.src shell/ash.c
| * archival/*: move "config:" snippets into .c filesDenys Vlasenko2013-11-141-0/+70
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * archival/*: move "applet:" snippets into .c files, part 2Denys Vlasenko2013-11-141-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * archival/*: move "applet:" snippets into .c filesDenys Vlasenko2013-11-141-3/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * archival/*: move "kbuild:" snippets into .c filesDenys Vlasenko2013-11-141-3/+11
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2013-08-271-13/+23
|\|
| * unpackers: by users' request, print compression percentage if -v and DESKTOPDenys Vlasenko2013-07-301-13/+23
| | | | | | | | | | | | | | function old new delta bbunpack 634 731 +97 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2013-03-191-25/+52
|\|
| * archival: note implicit dependencies between lzop & bbunzipMike Frysinger2013-03-031-0/+1
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * bbunzip: fix order of flags vs bit definesMike Frysinger2013-02-281-4/+4
| | | | | | | | | | | | | | Too much code shuffling. Reported-by: Mandeep Singh Baines <msb@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * bbunzip: ignore the -q flag with the decompressorsMike Frysinger2013-02-281-6/+7
| | | | | | | | | | | | | | | | The -q flag is used in shell scripts for suppressing output. Have our applets swallow the flag for compatibility. Reported-by: Mandeep Singh Baines <msb@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * zcat: fix "zcat FILE" trying to do detection twiceDenys Vlasenko2013-02-281-8/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * zcat: if seamless uncompressors are defined, autodetect file's formatDenys Vlasenko2013-02-281-14/+40
| | | | | | | | | | | | | | | | | | function old new delta bbunpack 526 622 +96 packed_usage 29335 29341 +6 gunzip_main 64 67 +3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fix error message on failure to oen /dev/null; fix zcat's help textDenys Vlasenko2013-02-281-6/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-03-231-55/+17
|\| | | | | | | | | Conflicts: Makefile.flags
| * Move seamless .Z support into unpack_gz_streamDenys Vlasenko2012-03-061-23/+1
| | | | | | | | | | | | | | unpack_gz_stream 566 643 +77 unpack_gunzip 123 12 -111 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * update seamless uncompression codeDenys Vlasenko2012-03-061-47/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes "tar tf hello_world.txz" work without adding special-casing for ".txz" extension. It also removes ever-growing magic checking code in rpm2cpio and get_header_tar - we reuse one which lives in setup_unzip_on_fd. function old new delta unpack_gz_stream 7 566 +559 check_signature16 - 70 +70 setup_unzip_on_fd 99 142 +43 handle_SIGCHLD - 41 +41 unpack_bz2_stream 342 376 +34 unzip_main 2352 2385 +33 bbunpack 503 533 +30 open_transformer 74 102 +28 unpack_Z_stream 1278 1304 +26 unpack_gunzip 101 123 +22 init_transformer_aux_data - 18 +18 unpack_xz_stream 2388 2402 +14 open_zipped 131 141 +10 rpm_main 1358 1363 +5 get_header_tar_lzma 52 57 +5 get_header_tar_bz2 52 57 +5 unpack_lzma_stream 2698 2702 +4 hash_find 234 233 -1 get_header_tar 1759 1733 -26 get_header_tar_gz 92 57 -35 unpack_uncompress 51 12 -39 rpm2cpio_main 201 147 -54 unpack_unxz 67 12 -55 unpack_bz2_stream_prime 55 - -55 get_header_tar_Z 86 - -86 unpack_gz_stream_with_info 539 - -539 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 14/6 up/down: 947/-890) Total: 57 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'c0cae52662ccced9df19f19ec94238d1b1e3bd71' into mergeRon Yorston2012-03-231-2/+7
|\| | | | | | | | | | | Conflicts: Makefile.flags scripts/basic/fixdep.c
| * bzcat: fix unpacking of more than one file, and unpacking of zero-size bz2. ↵Denys Vlasenko2011-10-311-1/+6
| | | | | | | | | | | | Closes 4393 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * rename archive.h to bb_archive.h. no code changesDenys Vlasenko2011-09-221-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '066f39956641300c1e5c6bfe6c11a115cea3e2cf' into mergeRon Yorston2012-03-221-7/+0
|\| | | | | | | | | Conflicts: procps/ps.c
| * *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-7/+0
| | | | | | | | | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'b83c9704128dd106071184e4b00335a3b8486857' into mergeRon Yorston2012-03-221-0/+76
|\|
| * move help text from include/usage.src.h to archival/*.cPere Orga2011-03-271-0/+76
| | | | | | | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '8d0e0cdadf726beab28ccdc7d69738c1534e1f74' into mergeRon Yorston2012-03-211-2/+2
|\| | | | | | | | | | | | | Conflicts: include/platform.h libbb/Kbuild.src libbb/messages.c
| * mass removal of underscores from _BB_DIR_foo and _BB_SUID_fooDenys Vlasenko2011-01-181-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge remote-tracking branch 'upstream/master'Nguyễn Thái Ngọc Duy2011-01-041-1/+1
|\|
| * rename archival/libunarchive -> archival/libarchive; move bz/ into itDenys Vlasenko2010-11-031-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '06f719fd79fe15ce6fd5431bc58fcb22851de24d^'Nguyễn Thái Ngọc Duy2011-01-041-1/+1
|\|
| * tweak help textDenys Vlasenko2010-10-091-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: bbunpack: close stdin before removing compressed fileNguyễn Thái Ngọc Duy2010-09-201-0/+2
|/ | | | | Windows does not allow to remove an opening file. Close it first, then we can remove it.
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-6/+6
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* randomconfig fixesDenys Vlasenko2010-07-051-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* xz compression detection: avoid the need to seekDenys Vlasenko2010-07-011-0/+9
| | | | | | | | | | | | | function old new delta unpack_unxz 12 67 +55 unpack_xz_stream 2357 2373 +16 xmalloc_read 197 199 +2 setup_unzip_on_fd 118 99 -19 rpm2cpio_main 222 203 -19 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/2 up/down: 73/-38) Total: 35 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* make it possible to keep usage texts in .c filesDenys Vlasenko2010-06-061-0/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* make it possible to have include/applets.h-esque entries in .c filesDenys Vlasenko2010-06-061-0/+2
| | | | | | As an example, bunzip2 and bzcat is changed to use it. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* archival/*: shrink by reusing sufficiently similar functionsDenys Vlasenko2010-05-311-35/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta append_ext - 16 +16 unxz_main 77 83 +6 unlzma_main 77 83 +6 uncompress_main 42 48 +6 gzip_main 184 190 +6 bzip2_main 114 120 +6 bunzip2_main 61 67 +6 bbunpack 469 475 +6 send_tree 355 360 +5 lzop_main 89 92 +3 gunzip_main 61 64 +3 make_new_name_lzop 84 82 -2 make_new_name_gunzip 114 112 -2 make_new_name_unxz 14 - -14 make_new_name_unlzma 14 - -14 make_new_name_uncompress 14 - -14 make_new_name_bunzip2 14 - -14 make_new_name_gzip 17 - -17 make_new_name_bzip2 17 - -17 ------------------------------------------------------------------------------ (add/remove: 1/6 grow/shrink: 10/2 up/down: 69/-94) Total: -25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: teach tar et. al. to understand .xz by heartDenys Vlasenko2010-05-301-1/+1
| | | | | | | | | | | | | | function old new delta unpack_xz_stream - 4126 +4126 setup_unzip_on_fd 80 150 +70 open_zipped 113 131 +18 unpack_unxz 5 12 +7 send_tree 360 353 -7 unpack_xz_stream_stdin 3953 - -3953 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 3/1 up/down: 4221/-3960) Total: 261 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* reorder parts of bbunzip.c, no code changesDenys Vlasenko2010-05-301-75/+48
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>