Path: blob/master/Utilities/cmliblzma/liblzma/common/easy_buffer_encoder.c
3153 views
// SPDX-License-Identifier: 0BSD12///////////////////////////////////////////////////////////////////////////////3//4/// \file easy_buffer_encoder.c5/// \brief Easy single-call .xz Stream encoder6//7// Author: Lasse Collin8//9///////////////////////////////////////////////////////////////////////////////1011#include "easy_preset.h"121314extern LZMA_API(lzma_ret)15lzma_easy_buffer_encode(uint32_t preset, lzma_check check,16const lzma_allocator *allocator, const uint8_t *in,17size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)18{19lzma_options_easy opt_easy;20if (lzma_easy_preset(&opt_easy, preset))21return LZMA_OPTIONS_ERROR;2223return lzma_stream_buffer_encode(opt_easy.filters, check,24allocator, in, in_size, out, out_pos, out_size);25}262728