diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-09-26 02:58:09 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-09-26 02:59:56 +0200 |
commit | 2c8dc0b855c38c5204d398ad306fa9cf43be1ada (patch) | |
tree | 59429d658012a3df0e548e1a5f08100fb2930fc0 /depends/lzma/include/decompress.h | |
parent | af234f35029de8c46aefecd8b9345b30ae1c51b0 (diff) | |
download | MultiMC-2c8dc0b855c38c5204d398ad306fa9cf43be1ada.tar MultiMC-2c8dc0b855c38c5204d398ad306fa9cf43be1ada.tar.gz MultiMC-2c8dc0b855c38c5204d398ad306fa9cf43be1ada.tar.lz MultiMC-2c8dc0b855c38c5204d398ad306fa9cf43be1ada.tar.xz MultiMC-2c8dc0b855c38c5204d398ad306fa9cf43be1ada.zip |
Compression algo dependencies, still need hackery...
Diffstat (limited to 'depends/lzma/include/decompress.h')
-rw-r--r-- | depends/lzma/include/decompress.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/depends/lzma/include/decompress.h b/depends/lzma/include/decompress.h new file mode 100644 index 00000000..cb10b2ba --- /dev/null +++ b/depends/lzma/include/decompress.h @@ -0,0 +1,58 @@ +/* + * Written in 2009 by Lloyd Hilaiel + * + * License + * + * All the cruft you find here is public domain. You don't have to credit + * anyone to use this code, but my personal request is that you mention + * Igor Pavlov for his hard, high quality work. + * + * easylzma/decompress.h - The API for LZMA decompression using easylzma + */ + +#pragma once + +#include "include/common.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** an opaque handle to an lzma decompressor */ +typedef struct _elzma_decompress_handle *elzma_decompress_handle; + +/** + * Allocate a handle to an LZMA decompressor object. + */ +elzma_decompress_handle EASYLZMA_API elzma_decompress_alloc(); + +/** + * set allocation routines (optional, if not called malloc & free will + * be used) + */ +void EASYLZMA_API +elzma_decompress_set_allocation_callbacks(elzma_decompress_handle hand, elzma_malloc mallocFunc, + void *mallocFuncContext, elzma_free freeFunc, + void *freeFuncContext); + +/** + * Free all data associated with an LZMA decompressor object. + */ +void EASYLZMA_API elzma_decompress_free(elzma_decompress_handle *hand); + +/** + * Perform decompression + * + * XXX: should the library automatically detect format by reading stream? + * currently it's based on data external to stream (such as extension + * or convention) + */ +int EASYLZMA_API elzma_decompress_run(elzma_decompress_handle hand, + elzma_read_callback inputStream, void *inputContext, + elzma_write_callback outputStream, void *outputContext, + elzma_file_format format); + +#ifdef __cplusplus +} +; +#endif |