3 ms·
Maybe I am missing something, but this approach is doomed to fail / produce small gains. A tar file is a concatenation of different 512 bytes of data. The firs
by siscia 6y ago
Maybe I am missing something, but this approach is doomed to fail / produce small gains.
A tar file is a concatenation of different 512 bytes of data. The first block contains the metadata of the file, and the next blocks contains the content.
Of those first 512 bytes of data, only the first 100 bytes contains the text.
Trying to play with the orders of files to make 100 bytes of data fit next to each other in block of 512 bytes, it does not seems a successful approach.
gzip use a 32kb windows, that can include up to 64 tar headers. At the very best we are saving 100bytes * 64 => 6400 bytes alright 7kb every 32kb. For an optimal compression of the (32-7)/32 => 78%.
The author says that the standard gzip compressed to 45768 / 337920 => 13%
I believe there are better approaches...
- Kuinox 6y agoYeah, like stop using tar, and use a better format like Zip Archives.
- david_draco 6y agozip seems to be the only widely supported compressed archive format that supports extracting a file content by jumping to the data location, and easy deletion of individual files.
- throwaway2048 6y agoZip archives do not support unix permissions
- Kuinox 6y agoOne more reason to use zip archives then !