1207753Smm/////////////////////////////////////////////////////////////////////////////// 2207753Smm// 3207753Smm/// \file easy_buffer_encoder.c 4207753Smm/// \brief Easy single-call .xz Stream encoder 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 15207753Smm 16207753Smmextern LZMA_API(lzma_ret) 17207753Smmlzma_easy_buffer_encode(uint32_t preset, lzma_check check, 18207753Smm lzma_allocator *allocator, const uint8_t *in, size_t in_size, 19207753Smm uint8_t *out, size_t *out_pos, size_t out_size) 20207753Smm{ 21207753Smm lzma_options_easy opt_easy; 22207753Smm if (lzma_easy_preset(&opt_easy, preset)) 23207753Smm return LZMA_OPTIONS_ERROR; 24207753Smm 25207753Smm return lzma_stream_buffer_encode(opt_easy.filters, check, 26207753Smm allocator, in, in_size, out, out_pos, out_size); 27207753Smm} 28