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.

_______________________________________________
Lzip-bug mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lzip-bug

Reply via email to