1 // SPDX-License-Identifier: 0BSD
3 ///////////////////////////////////////////////////////////////////////////////
6 /// \brief Calculates memory usage using lzma_memory_usage()
8 // Author: Lasse Collin
10 ///////////////////////////////////////////////////////////////////////////////
19 lzma_options_lzma lzma
= {
20 .dict_size
= (1U << 30) + (1U << 29),
25 .preset_dict_size
= 0,
26 .mode
= LZMA_MODE_NORMAL
,
33 lzma_options_filter filters[] = {
35 (lzma_options_lzma *)&lzma_preset_lzma[6 - 1] },
39 lzma_filter filters
[] = {
40 { LZMA_FILTER_LZMA1
, &lzma
},
44 printf("Encoder: %10" PRIu64
" B\n",
45 lzma_raw_encoder_memusage(filters
));
46 printf("Decoder: %10" PRIu64
" B\n",
47 lzma_raw_decoder_memusage(filters
));