README (793B)
1 2 Tools to "compress" linux files that have holes in them and "decompress" the results. 3 4 mksparse <infile> <outfile> # infile may be - for stdin 5 unsparse <infile> <outfile> # outfile may be - for stdout 6 7 8 $ truncate -s 1G image.bin 9 10 $ du -k image.bin 11 0 image.bin 12 13 $ mkfs.ext4 -F image.bin 14 ... 15 $ du -k image.bin 16 33184 image.bin 17 18 $ mksparse image.bin image.sparse 19 $ mksparse image.bin - | gzip -9 > image.sparse.gz 20 21 $ zcat image.sparse.gz | ./unsparse - image.new 22 23 $ ls -la image.* 24 -rw-rw-r-- 1 swetland swetland 1073741824 Dec 11 23:16 image.bin 25 -rw------- 1 swetland swetland 1073741824 Dec 11 23:19 image.new 26 -rw------- 1 swetland swetland 33976528 Dec 11 23:17 image.sparse 27 -rw-rw-r-- 1 swetland swetland 34887 Dec 11 23:17 image.sparse.gz 28 29 $ du -k image.new 30 33184