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