[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Lzip-bug] lunzip and sparse files
From: |
Tino Lange |
Subject: |
[Lzip-bug] lunzip and sparse files |
Date: |
Mon, 16 Oct 2017 09:14:20 +0000 (UTC) |
User-agent: |
Pan/0.141 (Tarzan's Death; 168b179 git.gnome.org/pan2) |
Hi Antonio,
currently I was impressed by "xz" when I extracted a compressed disk
image file (37 GBytes, will grow to 512 GBytes) accidentally on the wrong
harddisk (which -- as I thought -- had not enough space for
decompression, as only 110 GBytes were free on that disk). But: The
decompression worked! And the file system usage has not changed much
after decompression.
After wondering how that could be, and after reading a bit I saw that the
file has been created as "sparse" file, and in fact it did not grow much
by the "decompression". This is a feature of "xz". sparse files are a
feature of many file systems, almost all unix file systems, as well as
NTFS.
Could you add that feature to "l(un)zip" as well?
Test:
$ dd if=/dev/zero of=xz_testfile bs=1024 count=1024
$ dd if=/dev/zero of=lz_testfile bs=1024 count=1024
$ du -h --apparent-size xz_testfile lz_testfile
1,0M xz_testfile
1,0M lz_testfile
$ du -h xz_testfile lz_testfile
1,0M xz_testfile
1,0M lz_testfile
$ xz xz_testfile
$ lzip lz_testfile
$ lunzip lz_testfile.lz
$ xz -d xz_testfile.xz
$ du -h --apparent-size xz_testfile lz_testfile
1,0M xz_testfile
1,0M lz_testfile
$ du -h xz_testfile lz_testfile
4,0K xz_testfile
1,0M lz_testfile
(see that xz testfile has still 4k, although it is apparently
uncompressed now)
Thanks and cheers,
Tino
- [Lzip-bug] lunzip and sparse files,
Tino Lange <=