easy_preset.c 727 B

123456789101112131415161718192021222324252627
  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. /// \file easy_preset.c
  4. /// \brief Preset handling for easy encoder and decoder
  5. //
  6. // Author: Lasse Collin
  7. //
  8. // This file has been put into the public domain.
  9. // You can do whatever you want with this file.
  10. //
  11. ///////////////////////////////////////////////////////////////////////////////
  12. #include "easy_preset.h"
  13. extern bool
  14. lzma_easy_preset(lzma_options_easy *opt_easy, uint32_t preset)
  15. {
  16. if (lzma_lzma_preset(&opt_easy->opt_lzma, preset))
  17. return true;
  18. opt_easy->filters[0].id = LZMA_FILTER_LZMA2;
  19. opt_easy->filters[0].options = &opt_easy->opt_lzma;
  20. opt_easy->filters[1].id = LZMA_VLI_UNKNOWN;
  21. return false;
  22. }