lzip-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lzip-bug] lunzip and sparse files


From: Antonio Diaz Diaz
Subject: Re: [Lzip-bug] lunzip and sparse files
Date: Mon, 16 Oct 2017 20:18:15 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14

Hi Tino,

Tino Lange wrote:
Could you add that feature to "l(un)zip" as well?

I could do it. Ddrescue already creates sparse files, so I can copy the code into lzip.

But, have you considered these alternatives?

1) If compression and sparseness take about the same space, maybe a sparse file is preferable. (More robust).

2) Using the unix toolbox concept, it can be done even better. The code for sparse file creation in 'cp' seems pretty optimized:

$ dd if=/dev/zero of=testfile bs=1024 count=1024
$ lzip -k testfile
$ cp --sparse=always <(lzip -cd testfile.lz) cp_lz_testfile
$ xz -c testfile > xz_testfile.xz
$ xz -kd xz_testfile.xz
$ du -h *testfile*
0       cp_lz_testfile
1.1M    testfile
1.0K    testfile.lz
3.0K    xz_testfile
1.0K    xz_testfile.xz


Best regards,
Antonio.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]