lzma_decoder.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. /// \file lzma_decoder.h
  4. /// \brief LZMA decoder API
  5. ///
  6. // Authors: Igor Pavlov
  7. // Lasse Collin
  8. //
  9. // This file has been put into the public domain.
  10. // You can do whatever you want with this file.
  11. //
  12. ///////////////////////////////////////////////////////////////////////////////
  13. #ifndef LZMA_LZMA_DECODER_H
  14. #define LZMA_LZMA_DECODER_H
  15. #include "common.h"
  16. /// Allocates and initializes LZMA decoder
  17. extern lzma_ret lzma_lzma_decoder_init(lzma_next_coder *next,
  18. const lzma_allocator *allocator,
  19. const lzma_filter_info *filters);
  20. extern uint64_t lzma_lzma_decoder_memusage(const void *options);
  21. extern lzma_ret lzma_lzma_props_decode(
  22. void **options, const lzma_allocator *allocator,
  23. const uint8_t *props, size_t props_size);
  24. /// \brief Decodes the LZMA Properties byte (lc/lp/pb)
  25. ///
  26. /// \return true if error occurred, false on success
  27. ///
  28. extern bool lzma_lzma_lclppb_decode(
  29. lzma_options_lzma *options, uint8_t byte);
  30. #ifdef LZMA_LZ_DECODER_H
  31. /// Allocate and setup function pointers only. This is used by LZMA1 and
  32. /// LZMA2 decoders.
  33. extern lzma_ret lzma_lzma_decoder_create(
  34. lzma_lz_decoder *lz, const lzma_allocator *allocator,
  35. const void *opt, lzma_lz_options *lz_options);
  36. /// Gets memory usage without validating lc/lp/pb. This is used by LZMA2
  37. /// decoder, because raw LZMA2 decoding doesn't need lc/lp/pb.
  38. extern uint64_t lzma_lzma_decoder_memusage_nocheck(const void *options);
  39. #endif
  40. #endif