svn commit: trunk/busybox/archival: bz
vda at busybox.net
vda at busybox.net
Tue Oct 16 07:07:43 PDT 2007
Author: vda
Date: 2007-10-16 07:07:41 -0700 (Tue, 16 Oct 2007)
New Revision: 20265
Log:
bzip2: move state pointer to the offset 0 (smaller code)
ifdef out DecompressEnd if FEATURE_CLEAN_UP is not seleted
fallbackSort 1655 1672 +17
mainSort 2447 2458 +11
bzip2_main 109 119 +10
.rodata 123466 123469 +3
generateMTFValues 433 435 +2
handle_compress 355 356 +1
BZ2_bzCompress 79 78 -1
prepare_new_block 55 48 -7
compressStream 547 503 -44
sendMTFValues 2225 2140 -85
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/4 up/down: 44/-137) Total: -93 bytes
text data bss dec hex filename
676421 2538 12104 691063 a8b77 busybox_old
676328 2538 12104 690970 a8b1a busybox_unstripped
Modified:
trunk/busybox/archival/bz/bzlib.c
trunk/busybox/archival/bz/bzlib.h
trunk/busybox/archival/bzip2.c
Changeset:
Modified: trunk/busybox/archival/bz/bzlib.c
===================================================================
--- trunk/busybox/archival/bz/bzlib.c 2007-10-16 11:51:51 UTC (rev 20264)
+++ trunk/busybox/archival/bz/bzlib.c 2007-10-16 14:07:41 UTC (rev 20265)
@@ -363,6 +363,7 @@
/*---------------------------------------------------*/
+#if ENABLE_FEATURE_CLEAN_UP
static
void BZ2_bzCompressEnd(bz_stream *strm)
{
@@ -375,6 +376,7 @@
free(s->crc32table);
free(strm->state);
}
+#endif
/*---------------------------------------------------*/
Modified: trunk/busybox/archival/bz/bzlib.h
===================================================================
--- trunk/busybox/archival/bz/bzlib.h 2007-10-16 11:51:51 UTC (rev 20264)
+++ trunk/busybox/archival/bz/bzlib.h 2007-10-16 14:07:41 UTC (rev 20265)
@@ -43,20 +43,22 @@
#define BZ_CONFIG_ERROR (-9)
typedef struct bz_stream {
+ void *state;
char *next_in;
char *next_out;
unsigned avail_in;
unsigned avail_out;
/*unsigned long long total_in;*/
unsigned long long total_out;
- void *state;
} bz_stream;
/*-- Core (low-level) library functions --*/
static void BZ2_bzCompressInit(bz_stream *strm, int blockSize100k);
static int BZ2_bzCompress(bz_stream *strm, int action);
+#if ENABLE_FEATURE_CLEAN_UP
static void BZ2_bzCompressEnd(bz_stream *strm);
+#endif
/*-------------------------------------------------------------*/
/*--- end bzlib.h ---*/
Modified: trunk/busybox/archival/bzip2.c
===================================================================
--- trunk/busybox/archival/bzip2.c 2007-10-16 11:51:51 UTC (rev 20264)
+++ trunk/busybox/archival/bzip2.c 2007-10-16 14:07:41 UTC (rev 20265)
@@ -116,7 +116,9 @@
total = 0 USE_DESKTOP( + strm->total_out );
err:
+#if ENABLE_FEATURE_CLEAN_UP
BZ2_bzCompressEnd(strm);
+#endif
return total;
}
More information about the busybox-cvs
mailing list