Hello Joerg, Why would you need to read the file twice?
Maybe I should have prefaced my feature requests with a note that I have not looked into the packed structure of a tar file. I could see that, if the header placed at the beginning contained the length of the file contents inside of the tar-file. Is that the case? Our hack uses a delimiter (that needs is escaped if it appears in the content), so I never even considered need Thanks for reading, the info and getting back to me. -Carl ________________________________ From: Joerg Schilling <[email protected]> To: [email protected]; [email protected] Sent: Sunday, October 30, 2011 5:19 PM Subject: Re: [Bug-tar] Solution to updating compressed archives: Pre-compress files Carl Eklof <[email protected]> wrote: > Solution: > The solution requires two parts of the code to be modified: > 1) Compress each file before adding it to the archive. The UNIX philosophy is not to do archiving that may fail later because you cannot predict what happens. if you compress single files before archiving, you either need to read the file twice and you need to hope that the file will not change while doing this, or you will nees an unpredictable amount of temp space. Jörg -- EMail:[email protected] (home) Jörg Schilling D-13353 Berlin [email protected] (uni) [email protected] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
