Rizin
unix-like reverse engineering framework and cli tools
easy_decoder_memusage.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_decoder_memusage(uint32_t preset)
18 {
19  lzma_options_easy opt_easy;
20  if (lzma_easy_preset(&opt_easy, preset))
21  return UINT32_MAX;
22 
23  return lzma_raw_decoder_memusage(opt_easy.filters);
24 }
uint32_t preset
Definition: container.h:259
LZMA_API(uint64_t)
Calculate approximate memory usage of easy encoder.
bool lzma_easy_preset(lzma_options_easy *opt_easy, uint32_t preset)
Definition: easy_preset.c:17
Preset handling for easy encoder and decoder.
unsigned int uint32_t
Definition: sftypes.h:29
unsigned long uint64_t
Definition: sftypes.h:28
#define UINT32_MAX
lzma_filter filters[LZMA_FILTERS_MAX+1]
Definition: easy_preset.h:19