1207753Smm/////////////////////////////////////////////////////////////////////////////// 2207753Smm// 3207753Smm/// \file lzma_decoder.h 4207753Smm/// \brief LZMA decoder API 5207753Smm/// 6207753Smm// Authors: Igor Pavlov 7207753Smm// Lasse Collin 8207753Smm// 9207753Smm// This file has been put into the public domain. 10207753Smm// You can do whatever you want with this file. 11207753Smm// 12207753Smm/////////////////////////////////////////////////////////////////////////////// 13207753Smm 14207753Smm#ifndef LZMA_LZMA_DECODER_H 15207753Smm#define LZMA_LZMA_DECODER_H 16207753Smm 17207753Smm#include "common.h" 18207753Smm 19207753Smm 20207753Smm/// Allocates and initializes LZMA decoder 21207753Smmextern lzma_ret lzma_lzma_decoder_init(lzma_next_coder *next, 22292588Sdelphij const lzma_allocator *allocator, 23292588Sdelphij const lzma_filter_info *filters); 24207753Smm 25207753Smmextern uint64_t lzma_lzma_decoder_memusage(const void *options); 26207753Smm 27207753Smmextern lzma_ret lzma_lzma_props_decode( 28292588Sdelphij void **options, const lzma_allocator *allocator, 29207753Smm const uint8_t *props, size_t props_size); 30207753Smm 31207753Smm 32207753Smm/// \brief Decodes the LZMA Properties byte (lc/lp/pb) 33207753Smm/// 34207753Smm/// \return true if error occurred, false on success 35207753Smm/// 36207753Smmextern bool lzma_lzma_lclppb_decode( 37207753Smm lzma_options_lzma *options, uint8_t byte); 38207753Smm 39207753Smm 40207753Smm#ifdef LZMA_LZ_DECODER_H 41207753Smm/// Allocate and setup function pointers only. This is used by LZMA1 and 42207753Smm/// LZMA2 decoders. 43207753Smmextern lzma_ret lzma_lzma_decoder_create( 44292588Sdelphij lzma_lz_decoder *lz, const lzma_allocator *allocator, 45207753Smm const void *opt, lzma_lz_options *lz_options); 46207753Smm 47207753Smm/// Gets memory usage without validating lc/lp/pb. This is used by LZMA2 48207753Smm/// decoder, because raw LZMA2 decoding doesn't need lc/lp/pb. 49207753Smmextern uint64_t lzma_lzma_decoder_memusage_nocheck(const void *options); 50207753Smm 51207753Smm#endif 52207753Smm 53207753Smm#endif 54