aboutsummaryrefslogtreecommitdiff
path: root/src/xz/coder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-09-03 15:54:40 +0300
committerLasse Collin <lasse.collin@tukaani.org>2010-09-03 15:54:40 +0300
commit2fce9312f36727ea82f3430cc5d3a7d243c5f087 (patch)
tree637b26e333c75bb41acafe59aaf785eabbe4a3ec /src/xz/coder.c
parentTweak the compression presets -0 .. -5. (diff)
downloadxz-2fce9312f36727ea82f3430cc5d3a7d243c5f087.tar.xz
xz: Make -vv show also decompressor memory usage.
Diffstat (limited to 'src/xz/coder.c')
-rw-r--r--src/xz/coder.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xz/coder.c b/src/xz/coder.c
index 841f63a4..5182dddc 100644
--- a/src/xz/coder.c
+++ b/src/xz/coder.c
@@ -184,6 +184,13 @@ coder_set_compression_settings(void)
// Print memory usage info before possible dictionary
// size auto-adjusting.
message_mem_needed(V_DEBUG, memory_usage);
+ if (opt_mode == MODE_COMPRESS) {
+ const uint64_t decmem = lzma_raw_decoder_memusage(filters);
+ if (decmem != UINT64_MAX)
+ message(V_DEBUG, _("Decompression will need "
+ "%s MiB of memory."), uint64_to_str(
+ round_up_to_mib(decmem), 0));
+ }
if (memory_usage > memory_limit) {
// If --no-auto-adjust was used or we didn't find LZMA1 or