Denys Vlasenko
f16727ebbb
decompress_bunzip2: code shrink ~5 bytes
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-30 00:55:02 +02:00
Denys Vlasenko
0c576975c8
decompress_bunzip2: code shrink ~10 bytes
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-30 00:54:10 +02:00
Denys Vlasenko
5d49b72f1a
decompress_bunzip2: add profiling data to comment. no code changes
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 19:26:38 +02:00
Denys Vlasenko
1014a9adbf
decompress_bunzip2: relieve register pressure in hot function read_bunzip
...
function old new delta
unpack_bz2_stream 318 329 +11
read_bunzip 268 262 -6
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 19:01:58 +02:00
Denys Vlasenko
bf3bec51fc
decompress_bunzip2: keep bd->writeCRC in CPU reg in the hot loop
...
-5 bytes on 64-bit, +7 bytes on 32-bit.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 18:16:29 +02:00
Denys Vlasenko
36ef0a677e
decompress_bunzip2: code shrink
...
function old new delta
get_next_block 1828 1827 -1
get_bits 164 156 -8
read_bunzip 304 261 -43
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-52) Total: -52 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 16:05:05 +02:00
Denys Vlasenko
fb132e4737
whitespace cleanup
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00
Denys Vlasenko
caddfc8339
decompress_bunzip2: handle concatenated .bz2 files
...
function old new delta
unpack_bz2_stream 207 307 +100
start_bunzip 199 209 +10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 110/0) Total: 110 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 23:08:53 +02:00
Denys Vlasenko
0ef64bdb40
*: make GNU licensing statement forms more regular
...
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-08-16 20:14:46 +02:00
Denys Vlasenko
620e863ba2
bzip2 decompression: simple code shrink
...
function old new delta
unpack_bz2_stream_prime 60 55 -5
get_header_tar 1508 1496 -12
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-30 19:43:44 +02:00
Denis Vlasenko
5e34ff29bc
*: mass renaming of USE_XXXX to IF_XXXX
...
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
2009-04-21 11:09:40 +00:00
Denis Vlasenko
e9ad84dfd4
*: refactor handling of archived files. "tar f file.tar.lzma" now works too.
...
function old new delta
unpack_Z_stream - 1229 +1229
open_zipped - 176 +176
unpack_bz2_stream_prime - 60 +60
tar_main 642 677 +35
find_main 406 418 +12
sv_main 1222 1233 +11
decode_format_string 829 837 +8
cmp_main 641 649 +8
popstring 134 140 +6
filter_accept_list_reassign 120 125 +5
parse_and_put_prompt 800 804 +4
passwd_main 1053 1049 -4
make_new_name_gunzip 119 114 -5
rpm_main 1688 1670 -18
prepare 302 283 -19
xmalloc_open_zipped_read_close 135 61 -74
uncompress 1229 - -1229
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 8/5 up/down: 1554/-1349) Total: 205 bytes
2008-08-05 13:10:34 +00:00
Denis Vlasenko
86d88c0990
bunzip2: make proper fix for the problem "fixed" in rev. 22521
...
Thanks for Rob Landley <rob@landley.net>
2008-06-28 18:10:09 +00:00
Denis Vlasenko
defc1ea340
*: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
...
text data bss dec hex filename
808035 611 6868 815514 c719a busybox_old
804472 611 6868 811951 c63af busybox_unstripped
2008-06-27 02:52:20 +00:00
Denis Vlasenko
5fb79535ee
bunzip2: fix an uncompression error. Add the example to testsuite.
2008-06-26 20:27:42 +00:00
Denis Vlasenko
f5d8c90d73
style fixes, no code changes
2008-06-26 14:32:57 +00:00
Bernhard Reutner-Fischer
5e25ddb7d3
- use STD*_FILENO some more. No object-code changes
2008-05-19 09:48:17 +00:00
Denis Vlasenko
6b06cb80be
more of -Wall fixes from Cristian Ionescu-Idbohrn.
...
Some are fixing real bugs.
function old new delta
syslogd_main 938 958 +20
get_signum 136 143 +7
obj_load 777 782 +5
recv_from_to 210 214 +4
get_next_block 1795 1799 +4
display_topmem_process_list 1117 1121 +4
logread_main 484 487 +3
buffer_fill_and_print 73 76 +3
kill_main 687 689 +2
ll_remember_index 240 241 +1
do_stats 452 453 +1
if_readconf 166 165 -1
display_process_list 1192 1191 -1
run_applet_and_exit 507 505 -2
print_signames 33 31 -2
parse_one_line 1092 1090 -2
find_out_spec 57 55 -2
add_ksymoops_symbols 421 419 -2
ash_main 1407 1402 -5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 11/8 up/down: 54/-17) Total: 37 bytes
2008-05-15 21:30:45 +00:00
Denis Vlasenko
52a4388d95
bunzip: small code shrink and consmetics
...
read_bunzip 276 283 +7
get_bits 184 162 -22
get_next_block 1833 1810 -23
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 7/-45) Total: -38 bytes
2007-10-10 20:53:41 +00:00
Denis Vlasenko
66bbfbd581
bunzip2: trim verbose messages
...
text data bss dec hex filename
770752 1029 9696 781477 beca5 busybox_old
770691 1029 9696 781416 bec68 busybox_unstripped
2007-09-28 23:45:56 +00:00
Denis Vlasenko
c14d39e83a
rmp: add optional support for bz2 data. +50 bytes of code
2007-06-08 13:05:39 +00:00
Denis Vlasenko
4b924f3a5c
whitespace fixes
2007-05-30 00:29:55 +00:00
Denis Vlasenko
c6758a07c6
make compressed help code NOMMU- and NOFORK-friendly -
...
no forking anymore, bunzip2 unpack routine now does all it in memory.
2007-04-10 21:40:19 +00:00
Denis Vlasenko
246b5c3916
one-liner: fix indentation
2007-04-10 17:18:12 +00:00
Denis Vlasenko
b38cf3ff8a
bunzip2: big style cleanup. No code changes apart from one s/write/safe_write/
...
(verified with objdump).
2007-04-10 17:16:33 +00:00
Bernhard Reutner-Fischer
febe3c4211
- sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"
2007-04-04 20:52:03 +00:00
Denis Vlasenko
bf0a201008
style fixes
...
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
97a8dd3857
g[un]zip: add support for -v (verbose).
...
Add CONFIG_DESKTOP, almost all bloat from this change
is hidden under that.
2006-10-01 15:55:11 +00:00
Rob Landley
d921b2ecc0
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
...
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00
Rob Landley
1ec5b29054
More size shrinkage.
2006-05-29 07:42:02 +00:00
Rob Landley
e66c7efc31
Busybox is under the GPL.
2006-04-14 19:25:01 +00:00
Rob Landley
c57ec37959
Patch from Rob Sullivan to consolidate crc32 table generation.
2006-04-10 17:07:15 +00:00
Bernhard Reutner-Fischer
cfb53dfd5e
- include proper prototypes in libunarchive.
2006-04-02 21:50:01 +00:00
Rob Landley
dfba741457
Robert P. Day removed 8 gazillion occurrences of "extern" on function
...
definitions. (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Rob Landley
e7c43b66d7
Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)
...
from before "if(x) free(x)".
2006-03-01 16:39:45 +00:00
Rob Landley
efae294b15
Fix for an integer overflow bug that could cause a segfault on certain
...
pathological archives.
(Unlikely to have security implications, the only way to trigger it basically
wound up doing memset(dbuf,x,2^31) and triggering an immediate segfault. The
test basically gives us a more polite error message.)
Thanks to Ned Ludd and the Gentoo security guys for finding this.
2006-02-17 05:19:40 +00:00
Rob Landley
2c98c40ec8
The tendency of vi to auto-indent can be really annoying at times.
2006-02-17 05:12:03 +00:00
Rob Landley
f856eabcde
More whitespace than you can possibly imagine...
2006-02-17 03:43:49 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00
Rob Landley
1ff789c567
Stop gcc4 from nit-picking about signedness of char *.
2005-09-25 03:12:26 +00:00
Rob Landley
a8b98d63e7
Don't document compiler warnings. _FIX_ compiler warnings.
2004-11-16 12:07:04 +00:00
Eric Andersen
b225e2a76b
Fixup some warnings
2004-08-28 00:43:07 +00:00
Eric Andersen
aff114c33d
Larry Doolittle writes:
...
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.
Erik - please apply.
Authors - please check that I didn't corrupt any meaning.
Package importers - see if any of these changes should be
passed to the upstream authors.
I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.
What is "pretect redefined for test" in cmdedit.c?
Good luck on the 1.00 release!
- Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
c7bda1ce65
Remove trailing whitespace. Update copyright to include 2004.
2004-03-15 08:29:22 +00:00
Glenn L McGrath
5699b8525e
Move from read_gz to the pipe()+fork() method.
...
open_transformer(), common code for pipe+fork.
Function pointer for read() no longer needed.
Allow inflate to be initialised with a specified buffer size to avoid
over-reading.
Reset static variables in inflate_get_next_window to fix a bug where
only the first file in a .zip would be be extracted.
2003-11-15 23:19:05 +00:00
Glenn L McGrath
2685724e23
Fix tar -j support
...
Use the old fork() method of tar compression support, rather than
read_bz2....
- (*uncompress)(int in, int out) seems like a more natural interface
for compression code.
- it might improve performance by seperating the work into one cpu
bound and one io bound process.
- There is extra code required to do read_[gz|bunzip] since (*uncompress)(int in,
int out) will normally be used by the standalone compression applet.
There have been problems with this method so if you see a "Short read"
error let me know.
2003-11-05 04:55:58 +00:00
Eric Andersen
8179cf2b78
Put back the tar support stubs (and warnings) for now.
2003-10-31 08:52:57 +00:00
Glenn L McGrath
1c834407e3
Add some error messages, use xmalloc instead of malloc
2003-10-28 23:32:12 +00:00
Eric Andersen
5fa4db29f7
Another bzip2 update and speedup from Manuel Novoa III, with some
...
additional changes (primarily lots of comments) from Rob Landley.
2003-10-23 06:52:01 +00:00
Eric Andersen
1acfb72e71
Manuel Novoa III writes:
...
Hello Rob,
Here's a patch to your bunzip-3.c file. Nice work btw.
One minor bug fix... checking for error return when read()ing.
Some size/performance optimizations as well. One instance of
memset() seems unnecssary. You might want to take a look.
Anyway, on my machine, decompressing linux-2.6.0-test7.tar.bz2
to /dev/null gave the following times:
bunzip-3.c bzcat (system) bunzip-3.c (patched)
real 0m24.420s 0m22.725s 0m20.701s
user 0m23.930s 0m22.170s 0m20.180s
sys 0m0.070s 0m0.080s 0m0.140s
Size of the patched version is comparable (slightly larger or
smaller depending on compiler flags).
Manuel
2003-10-18 01:59:46 +00:00