summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-05-30 04:18:13 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-05-30 04:18:13 +0200
commit6948f210ed443f8153e0ba751e77bec8a0c6c8d4 (patch)
tree134443f225a788cbb4fda7b4713ee2bc535fb126 /include
parentfb6c76cb6eaade5693b7e99c33846c902689f1db (diff)
downloadbusybox-w32-6948f210ed443f8153e0ba751e77bec8a0c6c8d4.tar.gz
busybox-w32-6948f210ed443f8153e0ba751e77bec8a0c6c8d4.tar.bz2
busybox-w32-6948f210ed443f8153e0ba751e77bec8a0c6c8d4.zip
*: teach tar et. al. to understand .xz by heart
function old new delta unpack_xz_stream - 4126 +4126 setup_unzip_on_fd 80 150 +70 open_zipped 113 131 +18 unpack_unxz 5 12 +7 send_tree 360 353 -7 unpack_xz_stream_stdin 3953 - -3953 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 3/1 up/down: 4221/-3960) Total: 261 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h2
-rw-r--r--include/unarchive.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 2f67c7f72..326179b97 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -656,7 +656,7 @@ extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p) FAST
656 || ENABLE_FEATURE_SEAMLESS_BZ2 \ 656 || ENABLE_FEATURE_SEAMLESS_BZ2 \
657 || ENABLE_FEATURE_SEAMLESS_GZ \ 657 || ENABLE_FEATURE_SEAMLESS_GZ \
658 /* || ENABLE_FEATURE_SEAMLESS_Z */ 658 /* || ENABLE_FEATURE_SEAMLESS_Z */
659extern int setup_unzip_on_fd(int fd /*, int fail_if_not_detected*/) FAST_FUNC; 659extern void setup_unzip_on_fd(int fd /*, int fail_if_not_detected*/) FAST_FUNC;
660#else 660#else
661# define setup_unzip_on_fd(...) ((void)0) 661# define setup_unzip_on_fd(...) ((void)0)
662#endif 662#endif
diff --git a/include/unarchive.h b/include/unarchive.h
index 14cd98e24..783a943b6 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -143,14 +143,15 @@ typedef struct inflate_unzip_result {
143} inflate_unzip_result; 143} inflate_unzip_result;
144 144
145IF_DESKTOP(long long) int inflate_unzip(inflate_unzip_result *res, off_t compr_size, int src_fd, int dst_fd) FAST_FUNC; 145IF_DESKTOP(long long) int inflate_unzip(inflate_unzip_result *res, off_t compr_size, int src_fd, int dst_fd) FAST_FUNC;
146IF_DESKTOP(long long) int unpack_xz_stream_stdin(void) FAST_FUNC; 146/* xz unpacker takes .xz stream from offset 0 */
147IF_DESKTOP(long long) int unpack_xz_stream(int src_fd, int dst_fd) FAST_FUNC;
147/* lzma unpacker takes .lzma stream from offset 0 */ 148/* lzma unpacker takes .lzma stream from offset 0 */
148IF_DESKTOP(long long) int unpack_lzma_stream(int src_fd, int dst_fd) FAST_FUNC; 149IF_DESKTOP(long long) int unpack_lzma_stream(int src_fd, int dst_fd) FAST_FUNC;
149/* the rest wants 2 first bytes already skipped by the caller */ 150/* the rest wants 2 first bytes already skipped by the caller */
150IF_DESKTOP(long long) int unpack_bz2_stream(int src_fd, int dst_fd) FAST_FUNC; 151IF_DESKTOP(long long) int unpack_bz2_stream(int src_fd, int dst_fd) FAST_FUNC;
151IF_DESKTOP(long long) int unpack_gz_stream(int src_fd, int dst_fd) FAST_FUNC; 152IF_DESKTOP(long long) int unpack_gz_stream(int src_fd, int dst_fd) FAST_FUNC;
152IF_DESKTOP(long long) int unpack_gz_stream_with_info(int src_fd, int dst_fd, unpack_info_t *info) FAST_FUNC; 153IF_DESKTOP(long long) int unpack_gz_stream_with_info(int src_fd, int dst_fd, unpack_info_t *info) FAST_FUNC;
153IF_DESKTOP(long long) int unpack_Z_stream(int fd_in, int fd_out) FAST_FUNC; 154IF_DESKTOP(long long) int unpack_Z_stream(int src_fd, int dst_fd) FAST_FUNC;
154/* wrapper which checks first two bytes to be "BZ" */ 155/* wrapper which checks first two bytes to be "BZ" */
155IF_DESKTOP(long long) int unpack_bz2_stream_prime(int src_fd, int dst_fd) FAST_FUNC; 156IF_DESKTOP(long long) int unpack_bz2_stream_prime(int src_fd, int dst_fd) FAST_FUNC;
156 157