Rizin
unix-like reverse engineering framework and cli tools
easy_encoder.c
Go to the documentation of this file.
1 //
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.
10 //
12 
13 #include "easy_preset.h"
14 
15 
17 lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
18 {
19  lzma_options_easy opt_easy;
20  if (lzma_easy_preset(&opt_easy, preset))
21  return LZMA_OPTIONS_ERROR;
22 
23  return lzma_stream_encoder(strm, opt_easy.filters, check);
24 }
lzma_check
Type of the integrity check (Check ID)
Definition: check.h:27
uint32_t preset
Definition: container.h:259
lzma_check check
Definition: container.h:292
LZMA_API(lzma_ret)
Definition: easy_encoder.c:16
bool lzma_easy_preset(lzma_options_easy *opt_easy, uint32_t preset)
Definition: easy_preset.c:17
Preset handling for easy encoder and decoder.
static lzma_stream strm
Definition: full_flush.c:20
unsigned int uint32_t
Definition: sftypes.h:29
lzma_filter filters[LZMA_FILTERS_MAX+1]
Definition: easy_preset.h:19
Passing data to and from liblzma.
Definition: base.h:485
lzma_ret
Return values used by several functions in liblzma.
Definition: base.h:57
@ LZMA_OPTIONS_ERROR
Invalid or unsupported options.
Definition: base.h:160