Rizin
unix-like reverse engineering framework and cli tools
easy_preset.h File Reference

Preset handling for easy encoder and decoder. More...

#include "common.h"

Go to the source code of this file.

Classes

struct  lzma_options_easy
 

Functions

bool lzma_easy_preset (lzma_options_easy *easy, uint32_t preset)
 

Detailed Description

Preset handling for easy encoder and decoder.

Definition in file easy_preset.h.

Function Documentation

◆ lzma_easy_preset()

bool lzma_easy_preset ( lzma_options_easy easy,
uint32_t  preset 
)

Set *easy to the settings given by the preset. Returns true on error, false on success.

Definition at line 17 of file easy_preset.c.

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
#define LZMA_FILTER_LZMA2
LZMA2 Filter ID.
Definition: lzma12.h:40
#define LZMA_VLI_UNKNOWN
VLI value to denote that the value is unknown.
Definition: vli.h:39

References lzma_options_easy::filters, lzma_filter::id, LZMA_FILTER_LZMA2, LZMA_VLI_UNKNOWN, lzma_options_easy::opt_lzma, lzma_filter::options, and preset.

Referenced by get_options(), and LZMA_API().