Rizin
unix-like reverse engineering framework and cli tools
easy_preset.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 
16 extern bool
18 {
19  if (lzma_lzma_preset(&opt_easy->opt_lzma, preset))
20  return true;
21 
22  opt_easy->filters[0].id = LZMA_FILTER_LZMA2;
23  opt_easy->filters[0].options = &opt_easy->opt_lzma;
24  opt_easy->filters[1].id = LZMA_VLI_UNKNOWN;
25 
26  return false;
27 }
uint32_t preset
Definition: container.h:259
bool lzma_easy_preset(lzma_options_easy *opt_easy, uint32_t preset)
Definition: easy_preset.c:17
Preset handling for easy encoder and decoder.
#define LZMA_FILTER_LZMA2
LZMA2 Filter ID.
Definition: lzma12.h:40
unsigned int uint32_t
Definition: sftypes.h:29
void * options
Pointer to filter-specific options structure.
Definition: filter.h:63
lzma_vli id
Filter ID.
Definition: filter.h:54
lzma_options_lzma opt_lzma
Options for LZMA2.
Definition: easy_preset.h:22
lzma_filter filters[LZMA_FILTERS_MAX+1]
Definition: easy_preset.h:19
#define LZMA_VLI_UNKNOWN
VLI value to denote that the value is unknown.
Definition: vli.h:39