1207753Smm///////////////////////////////////////////////////////////////////////////////
2207753Smm//
3207753Smm/// \file       easy_encoder.c
4207753Smm/// \brief      Easy .xz Stream encoder initialization
5207753Smm//
6207753Smm//  Author:     Lasse Collin
7207753Smm//
8207753Smm//  This file has been put into the public domain.
9207753Smm//  You can do whatever you want with this file.
10207753Smm//
11207753Smm///////////////////////////////////////////////////////////////////////////////
12207753Smm
13207753Smm#include "easy_preset.h"
14207753Smm#include "stream_encoder.h"
15207753Smm
16207753Smm
17207753Smmextern LZMA_API(lzma_ret)
18207753Smmlzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
19207753Smm{
20207753Smm	lzma_options_easy opt_easy;
21207753Smm	if (lzma_easy_preset(&opt_easy, preset))
22207753Smm		return LZMA_OPTIONS_ERROR;
23207753Smm
24207753Smm	return lzma_stream_encoder(strm, opt_easy.filters, check);
25207753Smm}
26