Follow-up Comment #8, bug #23891 (project freeciv):
From the xz man page:
For example, decompressing a file created with xz -9 currently
requires 65 MiB of memory.
[...]
-7 ... -9
These are like -6 but with higher compressor and decom‐
pressor memory requirements. These are useful only when
compressing files bigger than 8 MiB, 16 MiB, and 32 MiB,
respectively.
[...]
The following table summarises the features of the presets:
Preset DictSize CompCPU CompMem DecMem
....
-6 8 MiB 6 94 MiB 9 MiB
....
-9 64 MiB 6 674 MiB 65 MiB
Examining the compressed file:
$ unxz -lvv mouldy-T0032-Y-2400-manual.sav.xz
Blocks: 1
Compressed size: 11.9 KiB (12,136 B)
Uncompressed size: 133.8 KiB (136,986 B)
Ratio: 0.089
Check: CRC32
Stream padding: 0 B
Streams:
Stream Blocks CompOffset UncompOffset CompSize
UncompSize Ratio Check Padding
1 1 0 0 12,136
136,986 0.089 CRC32 0
Blocks:
Stream Block CompOffset UncompOffset TotalSize
UncompSize Ratio Check CheckVal Header Flags CompSize
MemUsage Filters
1 1 12 0 12,100
136,986 0.088 CRC32 c2ccb49c 12 -- 12,084 65 MiB
--lzma2=dict=64MiB
Memory needed: 65 MiB
Sizes in headers: No
Minimum XZ Utils version: 5.0.0
From which I think:
* The server that saved the file must have had "compress" set to 9 (I infer
from MemUsage and "--lzma2=dict=64MiB"). Default is 6, which is much more
sensible.
* 65 MiB should always be enough, I think?
* If we could predict the uncompressed size of the savefile, we could dial
down pointless memory usage in the decompressor. (But we can't, and in any
case the decompressor still has to handle the worst case anyway.)
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?23891>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev