1*2940b44dSPeter Avalos /////////////////////////////////////////////////////////////////////////////// 2*2940b44dSPeter Avalos // 3*2940b44dSPeter Avalos /// \file easy_encoder.c 4*2940b44dSPeter Avalos /// \brief Easy .xz Stream encoder initialization 5*2940b44dSPeter Avalos // 6*2940b44dSPeter Avalos // Author: Lasse Collin 7*2940b44dSPeter Avalos // 8*2940b44dSPeter Avalos // This file has been put into the public domain. 9*2940b44dSPeter Avalos // You can do whatever you want with this file. 10*2940b44dSPeter Avalos // 11*2940b44dSPeter Avalos /////////////////////////////////////////////////////////////////////////////// 12*2940b44dSPeter Avalos 13*2940b44dSPeter Avalos #include "easy_preset.h" 14*2940b44dSPeter Avalos 15*2940b44dSPeter Avalos 16*2940b44dSPeter Avalos extern LZMA_API(lzma_ret) lzma_easy_encoder(lzma_stream * strm,uint32_t preset,lzma_check check)17*2940b44dSPeter Avaloslzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check) 18*2940b44dSPeter Avalos { 19*2940b44dSPeter Avalos lzma_options_easy opt_easy; 20*2940b44dSPeter Avalos if (lzma_easy_preset(&opt_easy, preset)) 21*2940b44dSPeter Avalos return LZMA_OPTIONS_ERROR; 22*2940b44dSPeter Avalos 23*2940b44dSPeter Avalos return lzma_stream_encoder(strm, opt_easy.filters, check); 24*2940b44dSPeter Avalos } 25