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 ///////////////////////////////////////////////////////////////////////////////
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", lzma_memusage_encoder(filters));
45 printf("Decoder: %10" PRIu64 " B\n", lzma_memusage_decoder(filters));