diff options
Diffstat (limited to 'include/iprt/zip.h')
-rw-r--r-- | include/iprt/zip.h | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/include/iprt/zip.h b/include/iprt/zip.h index f3bfd4bd..83ab92f7 100644 --- a/include/iprt/zip.h +++ b/include/iprt/zip.h @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * Copyright (C) 2006-2010 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -29,7 +29,6 @@ #include <iprt/cdefs.h> #include <iprt/types.h> - RT_C_DECLS_BEGIN /** @defgroup grp_rt_zip RTZip - Compression @@ -221,13 +220,36 @@ RTDECL(int) RTZipBlockDecompress(RTZIPTYPE enmType, uint32_t fFlags, * * @returns IPRT status code. * - * @param hVfsIosIn The compressed input stream. The reference is - * not consumed, instead another one is retained. + * @param hVfsIosIn The compressed input stream (must be readable). + * The reference is not consumed, instead another + * one is retained. * @param fFlags Flags, MBZ. - * @param phVfsIosOut Where to return the handle to the gzip I/O - * stream. + * @param phVfsIosGunzip Where to return the handle to the gunzipped I/O + * stream (read). + */ +RTDECL(int) RTZipGzipDecompressIoStream(RTVFSIOSTREAM hVfsIosIn, uint32_t fFlags, PRTVFSIOSTREAM phVfsIosGunzip); + +/** @name RTZipGzipDecompressIoStream flags. + * @{ */ +/** Allow the smaller ZLIB header as well as the regular GZIP header. */ +#define RTZIPGZIPDECOMP_F_ALLOW_ZLIB_HDR RT_BIT(0) +/** @} */ + + +/** + * Opens a gzip decompression I/O stream. + * + * @returns IPRT status code. + * + * @param hVfsIosDst The compressed output stream (must be writable). + * The reference is not consumed, instead another + * one is retained. + * @param fFlags Flags, MBZ. + * @param uLevel The gzip compression level, 1 thru 9. + * @param phVfsIosGzip Where to return the gzip input I/O stream handle + * (you write to this). */ -RTDECL(int) RTZipGzipDecompressIoStream(RTVFSIOSTREAM hVfsIosIn, uint32_t fFlags, PRTVFSIOSTREAM phVfsIosOut); +RTDECL(int) RTZipGzipCompressIoStream(RTVFSIOSTREAM hVfsIosDst, uint32_t fFlags, uint8_t uLevel, PRTVFSIOSTREAM phVfsIosGzip); /** * Opens a TAR filesystem stream. @@ -255,6 +277,21 @@ RTDECL(int) RTZipTarFsStreamFromIoStream(RTVFSIOSTREAM hVfsIosIn, uint32_t fFlag */ RTDECL(RTEXITCODE) RTZipTarCmd(unsigned cArgs, char **papszArgs); +/** + * Opens a XAR filesystem stream. + * + * This is used to extract, list or check a XAR archive. + * + * @returns IPRT status code. + * + * @param hVfsIosIn The compressed input stream. The reference is + * not consumed, instead another one is retained. + * @param fFlags Flags, MBZ. + * @param phVfsFss Where to return the handle to the XAR filesystem + * stream. + */ +RTDECL(int) RTZipXarFsStreamFromIoStream(RTVFSIOSTREAM hVfsIosIn, uint32_t fFlags, PRTVFSFSSTREAM phVfsFss); + /** @} */ RT_C_DECLS_END |