1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief Calculates memory usage using lzma_memory_usage()
6 // Author: Lasse Collin
8 // This file has been put into the public domain.
9 // You can do whatever you want with this file.
11 ///////////////////////////////////////////////////////////////////////////////
20 lzma_options_lzma lzma
= {
21 .dict_size
= (1U << 30) + (1U << 29),
26 .preset_dict_size
= 0,
27 .mode
= LZMA_MODE_NORMAL
,
34 lzma_options_filter filters[] = {
36 (lzma_options_lzma *)&lzma_preset_lzma[6 - 1] },
40 lzma_filter filters
[] = {
41 { LZMA_FILTER_LZMA1
, &lzma
},
45 printf("Encoder: %10" PRIu64
" B\n",
46 lzma_raw_encoder_memusage(filters
));
47 printf("Decoder: %10" PRIu64
" B\n",
48 lzma_raw_decoder_memusage(filters
));