2008-01-22 20:49:24 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2009-02-17 08:43:00 +00:00
|
|
|
/// \file easy_encoder.c
|
|
|
|
/// \brief Easy .xz Stream encoder initialization
|
2008-01-22 20:49:24 +00:00
|
|
|
//
|
2009-04-13 08:27:40 +00:00
|
|
|
// Author: Lasse Collin
|
2008-01-22 20:49:24 +00:00
|
|
|
//
|
2009-04-13 08:27:40 +00:00
|
|
|
// This file has been put into the public domain.
|
|
|
|
// You can do whatever you want with this file.
|
2008-01-22 20:49:24 +00:00
|
|
|
//
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2009-02-17 08:43:00 +00:00
|
|
|
#include "easy_preset.h"
|
2008-01-22 20:49:24 +00:00
|
|
|
|
|
|
|
|
2009-02-02 18:14:03 +00:00
|
|
|
extern LZMA_API(lzma_ret)
|
2008-12-27 17:27:49 +00:00
|
|
|
lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
|
2008-01-22 20:49:24 +00:00
|
|
|
{
|
2009-11-14 16:59:19 +00:00
|
|
|
lzma_options_easy opt_easy;
|
|
|
|
if (lzma_easy_preset(&opt_easy, preset))
|
|
|
|
return LZMA_OPTIONS_ERROR;
|
2008-01-22 20:49:24 +00:00
|
|
|
|
2009-11-14 16:59:19 +00:00
|
|
|
return lzma_stream_encoder(strm, opt_easy.filters, check);
|
2008-01-22 20:49:24 +00:00
|
|
|
}
|