aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-10-29 19:01:58 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-10-29 19:01:58 +0200
commit1014a9adbf2f32684865b052bab803581d416875 (patch)
tree333b518e23d4404ba529c4fe70fce27a1125492b /include
parentbf3bec51fced9dbc800954885191e5671cb485ef (diff)
downloadbusybox-1014a9adbf2f32684865b052bab803581d416875.tar.gz
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>
Diffstat (limited to 'include')
-rw-r--r--include/unarchive.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/unarchive.h b/include/unarchive.h
index 11d8c77a0..ba6d323e0 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -194,6 +194,8 @@ extern const llist_t *find_list_entry2(const llist_t *list, const char *filename
/* A bit of bunzip2 internals are exposed for compressed help support: */
typedef struct bunzip_data bunzip_data;
int start_bunzip(bunzip_data **bdp, int in_fd, const void *inbuf, int len) FAST_FUNC;
+/* NB: read_bunzip returns < 0 on error, or the number of *unfilled* bytes
+ * in outbuf. IOW: on EOF returns len ("all bytes are not filled"), not 0: */
int read_bunzip(bunzip_data *bd, char *outbuf, int len) FAST_FUNC;
void dealloc_bunzip(bunzip_data *bd) FAST_FUNC;