easy_encoder.c 706 B

12345678910111213141516171819202122232425
  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. /// \file easy_encoder.c
  4. /// \brief Easy .xz Stream encoder initialization
  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. #include "stream_encoder.h"
  14. extern LZMA_API(lzma_ret)
  15. lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
  16. {
  17. lzma_options_easy opt_easy;
  18. if (lzma_easy_preset(&opt_easy, preset))
  19. return LZMA_OPTIONS_ERROR;
  20. return lzma_stream_encoder(strm, opt_easy.filters, check);
  21. }