aboutsummaryrefslogtreecommitdiff
path: root/archival/gzip.c
AgeCommit message (Collapse)Author
2016-08-15gzip: fix compression level bug. Closes 9131Natanael Copa
fix broken logic to get the gzip_level_config value from options -1 to -9. This fixes an off-by-one bug that caused gzip -9 output bigger files than the other compression levels. It fixes so that compression level 1 to 3 are actually mapped to level 4 as comments say. It also fixes that levels -4 to -9 is mapped to correct level and avoids out-of-bounds access. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-20randomconfig fixes 4Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-27gzip: add support for --no-name long optionAaro Koskinen
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>
2015-07-13Removes stray empty line from codeManinder Singh
This patch removes stray empty line from busybox code reported by script find_stray_empty_lines Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-04-26gzip: add support for compression levels 4-9Aaro Koskinen
function old new delta gzip_main 192 282 +90 static.gzip_level_config - 24 +24 packed_usage 30439 30459 +20 fill_window 216 220 +4 pack_gzip 1789 1729 -60 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/1 up/down: 138/-60) Total: 78 bytes Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-03gzip: trivial code shrink -5 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-02gzip: speed up and shrink put_16bit()Denys Vlasenko
function old new delta put_16bit 104 98 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-02gzip: do not store timestamp in gzip headerRich Felker
Storing the original file's modification time in the output file is harmful (precludes deterministic results) and unlike official gzip, the busybox version provides no way to suppress this behavior; the -n option is silently ignored. Rather than trying to make -n work, this patch just removes the timestamp-storing functionality. It should be considered deprecated anyway; it's not Y2038-safe and gunzip ignores it by default. Per RFC 1952, 0 is the correct value to store to indicate that there is no timestamp. Signed-off-by: Rich Felker <dalias@libc.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-12-07Rename transformer_aux_data_t -> transformer_state_tDenys Vlasenko
No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-14archival/*: move "config:" snippets into .c filesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-14archival/*: move "applet:" snippets into .c filesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-14archival/*: move "kbuild:" snippets into .c filesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14whitespace fixes. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06update seamless uncompression codeDenys Vlasenko
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>
2011-09-22rename archive.h to bb_archive.h. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-10regularize options which control size/speed tradeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-09gzip: new GZIP_BIG_MEM optionIan Wienand
Enabling the config option on my standard linux box and zipping a random 250mb file: small mem: 21.85user 0.44system 0:22.35elapsed big mem: 13.45user 0.46system 0:13.94elapsed Signed-off-by: Ian Wienand <ianw@vmware.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05*: remove "Options:" string from help textsDenys Vlasenko
function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16Fix double words in comments. No code changesMarek Polacek
Signed-off-by: Marek Polacek <mpolacek@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-27move help text from include/usage.src.h to archival/*.cPere Orga
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-03rename archival/libunarchive -> archival/libarchive; move bz/ into itDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28*: whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-27libbb: introduce and use common crc32 routineDenys Vlasenko
function old new delta crc32_block_endian1 - 37 +37 crc32_block_endian0 - 34 +34 global_crc32_table - 8 +8 file_read 82 87 +5 gzip_main 211 214 +3 xz_crc32 40 35 -5 crc32_table 8 - -8 calculate_gunzip_crc 54 34 -20 lzo_crc32 54 25 -29 cksum_main 298 211 -87 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 2/4 up/down: 87/-149) Total: -62 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
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>
2010-06-06pipe_progress: make it independent of printf machineryDenys Vlasenko
function old new delta bb_putchar_stderr - 24 +24 ParseField 494 471 -23 progress_meter 212 188 -24 xargs_main 888 842 -46 pipe_progress_main 151 105 -46 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 0/4 up/down: 24/-139) Total: -115 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-31archival/*: shrink by reusing sufficiently similar functionsDenys Vlasenko
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>
2010-01-28style fixes, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-28*: style fixes. no code changes (verified with objdump)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-06gzip: add optional support for --long-optsMatheus Izvekov
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23*: optimize most of isXXXXX() macrosDenys Vlasenko
text data bss dec hex filename 824164 453 6812 831429 cafc5 busybox_old 823730 453 6812 830995 cae13 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06remove some GNUisms. by Dan Fandrich (dan AT coneharvesters.com)Denys Vlasenko
function old new delta logdirs_reopen 1310 1308 -2 read_line_input 4757 4753 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-6) Total: -6 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-18gzip: fix gzip with many files corrupting some files after firstDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-04-21*: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
2008-11-01gunzip: restore mtime. approx +80 bytes of codeDenis Vlasenko
rpm: make code more robust lsmod: small code shrink
2008-07-05*: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko
2008-06-27support gzip -t and bzip2 -tDenis Vlasenko
2008-03-30g[un]zip: accept and ignore -n (needed for kernel compile)Denis Vlasenko
2008-03-17*: fix fallout from -Wunused-parameterDenis Vlasenko
function old new delta bbunpack 358 366 +8 passwd_main 1070 1072 +2 handle_incoming_and_exit 2651 2653 +2 getpty 88 86 -2 script_main 975 972 -3 inetd_main 2036 2033 -3 dname_enc 377 373 -4 make_new_session 474 462 -12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/5 up/down: 12/-24) Total: -12 bytes text data bss dec hex filename 797429 658 7428 805515 c4a8b busybox_old 797417 658 7428 805503 c4a7f busybox_unstripped
2008-02-27*: add optimization barrier to all "G trick" locationsDenis Vlasenko
2007-10-13bzip2: port bzip2 1.0.4 to busybox. note: bzip2 code residesDenis Vlasenko
in separate directory (archival/bz/*) and is covered by BSD-style license. code size: 13k
2007-10-11add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-09-27introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).Denis Vlasenko
2007-08-18don't pass argc in getopt32, it's superfluousDenis Vlasenko
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
2007-08-12trylink: produce even more info about final link stageDenis Vlasenko
trylink: explain how to modify link and drastically decrease amount of padding (unfortunately, needs hand editing ATM). *: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts size saving: 0.5k
2007-07-21style fix (stray space before ';')Denis Vlasenko
2007-05-26usage.c: remove reference to busybox.hDenis Vlasenko
*: s/include "busybox.h"/include "libbb.h"
2007-04-12style fixes. No code changesDenis Vlasenko
2007-04-10make compressed help code NOMMU- and NOFORK-friendly -Denis Vlasenko
no forking anymore, bunzip2 unpack routine now does all it in memory.
2007-03-22gzip: fix -d option handlingDenis Vlasenko
2007-03-20fix accumulated whitespace and indentation damageDenis Vlasenko