From 1014a9adbf2f32684865b052bab803581d416875 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 29 Oct 2010 19:01:58 +0200 Subject: 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 --- include/unarchive.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/unarchive.h') 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; -- cgit v1.2.3