diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-11-10 14:02:38 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-11-10 14:02:38 +0000 |
commit | 7b75da706bf852114d792cf3b0f3c73ae0ca0fb8 (patch) | |
tree | c76bdff652167455b3e9534bedf558ae88a3dcdb /Build/source/extra/xz-4.999.9beta/debug/memusage.c | |
parent | 84ef24a5151f308cbe96edd705d1cdedd98a4210 (diff) |
directories not used for build moved to extra/
git-svn-id: svn://tug.org/texlive/trunk@15980 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/extra/xz-4.999.9beta/debug/memusage.c')
-rw-r--r-- | Build/source/extra/xz-4.999.9beta/debug/memusage.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Build/source/extra/xz-4.999.9beta/debug/memusage.c b/Build/source/extra/xz-4.999.9beta/debug/memusage.c new file mode 100644 index 00000000000..93fe0b2ca79 --- /dev/null +++ b/Build/source/extra/xz-4.999.9beta/debug/memusage.c @@ -0,0 +1,49 @@ +/////////////////////////////////////////////////////////////////////////////// +// +/// \file memusage.c +/// \brief Calculates memory usage using lzma_memory_usage() +// +// Author: Lasse Collin +// +// This file has been put into the public domain. +// You can do whatever you want with this file. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "sysdefs.h" +#include "lzma.h" +#include <stdio.h> + +int +main(void) +{ + lzma_options_lzma lzma = { + .dict_size = (1U << 30) + (1U << 29), + .lc = 3, + .lp = 0, + .pb = 2, + .preset_dict = NULL, + .preset_dict_size = 0, + .mode = LZMA_MODE_NORMAL, + .nice_len = 48, + .mf = LZMA_MF_BT4, + .depth = 0, + }; + +/* + lzma_options_filter filters[] = { + { LZMA_FILTER_LZMA1, + (lzma_options_lzma *)&lzma_preset_lzma[6 - 1] }, + { UINT64_MAX, NULL } + }; +*/ + lzma_filter filters[] = { + { LZMA_FILTER_LZMA1, &lzma }, + { UINT64_MAX, NULL } + }; + + printf("Encoder: %10" PRIu64 " B\n", lzma_memusage_encoder(filters)); + printf("Decoder: %10" PRIu64 " B\n", lzma_memusage_decoder(filters)); + + return 0; +} |