aboutsummaryrefslogtreecommitdiff
path: root/lib/bunzip.c
AgeCommit message (Collapse)Author
2014-02-07Move bunzip2 logic from lib into bzcat.Rob Landley
2013-10-06Whitespace tweaks and remove unused variable.Rob Landley
2013-10-06It's not a problem to exactly fill up the buffer with a run if the next ↵Rob Landley
symbol is the terminating symbol. Fixes https://jira.cyanogenmod.org/browse/CYAN-1896
2013-04-26Eliminate leaked global bunzip_errors.Rob Landley
2012-11-13Reindent to two spaces per level. Remove vi: directives that haven't worked ↵Rob Landley
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style. The actual code should be the same afterward, this is just cosmetic refactoring.
2009-01-05Add -N, -I, -L, and -P options to cksum.Rob Landley
2009-01-03Check in crc_init needed by cksum. (Oops.)Rob Landley
2008-06-28A pathological case of huffman coding that uses 8 bits to code each of 256Rob Landley
symbols could cause an unsigned char limit[8] to wrap back to 0, setting limit to -1 and making the decompressor exit with a data error.
2008-01-19Zap toys/Config.in and instead create generated/Config.in from contents ofRob Landley
toys/*.c. Move relevant info into comment at the top of each toys/*.c. Also convert more of Makefile into a thin wrapper around shell scripts that actually do the work. (Makefile is only still there for the user interface.)
2007-12-24Major refactoring of bunzip.c in preparation for doing a multi-threaded version.Rob Landley
2007-11-15Remove trailing whitespace (thanks to Charlie Shepherd), and a couple commentRob Landley
tweaks.
2007-02-03Teach build to build only the toys/*.c selected in .config, and teachRob Landley
CFG_TOYSH_DEBUG to shut up the spurious "gcc can't tell that this is never actually used uninitialized because gcc is stupid" warnings.
2007-01-20Merge a memset with an existing loop, tweak comments.Rob Landley
2007-01-19Merge two similar loops and expand a comment.Rob Landley
2007-01-19Another suggestion from Manuel: Grab 2 bits instead of 1 inside a loop. SavesRob Landley
4 bytes and reduces running time by one half of one percent.
2007-01-18In bunzip replace setjmp/longjmp handling with error_exit(), replace stringRob Landley
based handling of a 6-byte header with with two 24-bit integer reads. Use xmalloc() and xzalloc().
2007-01-18More optimizations originally suggested by Manuel Nova: Use a sentinel valueRob Landley
for limit[] to move a test out of a loop. Unroll a single-bit get_bits() to avoid a function call in the common case on a hot path. And one more application of the old "two tests in one via typecasting and/or math" trick.
2007-01-17Minor cleanups.Rob Landley
2007-01-17Turn a memmove into a while(), reducing running time by 3.5% in my tests.Rob Landley
2007-01-17Another application of Manuel Nova's "math instead of ifs" trick. Saves 17b.Rob Landley
2007-01-17Minor optimization the compiler already does for us (according to bloatcheck),Rob Landley
but it looks cleaner.
2007-01-17Fix off by one error in a test.Rob Landley
2007-01-17Comment and whitespace changes.Rob Landley
2007-01-16Memmove is 11 bytes shorter than the unrolled loop, and Manuel Nova pointedRob Landley
out how to turn an if/else into a multiply and subtract (saving 2 bytes).
2007-01-16Add a quick and dirt bzcat (stdin to stdout only for the moment) to testRob Landley
out the bunzip2 library.
2006-12-31Remove more warnings.Rob Landley
2006-11-26Trawling through the archives: a broken test, an unnecessary memset, and aRob Landley
unrolling a small memmove.
2006-11-26More whitespace/cowbell. (And change comment style to //.)Rob Landley
2006-11-25Add my old micro-bunzip library. Needs some cleanup...Rob Landley