Tests: Fix memory leaks in test_block_header.
[xz/debian.git] / src / liblzma / common / easy_encoder.c
blob5cb492dd0681def7f3ff554a2643ca38422cbd40
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.
11 ///////////////////////////////////////////////////////////////////////////////
13 #include "easy_preset.h"
16 extern LZMA_API(lzma_ret)
17 lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
19 lzma_options_easy opt_easy;
20 if (lzma_easy_preset(&opt_easy, preset))
21 return LZMA_OPTIONS_ERROR;
23 return lzma_stream_encoder(strm, opt_easy.filters, check);