bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] Solution to updating compressed archives: Pre-compress fil


From: Carl Eklof
Subject: Re: [Bug-tar] Solution to updating compressed archives: Pre-compress files
Date: Sun, 30 Oct 2011 17:03:14 -0700 (PDT)

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 <address@hidden>
To: address@hidden; address@hidden
Sent: Sunday, October 30, 2011 5:19 PM
Subject: Re: [Bug-tar] Solution to updating compressed archives: Pre-compress files

Carl Eklof <address@hidden> 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:address@hidden (home) Jörg Schilling D-13353 Berlin
      address@hidden                (uni) 
      address@hidden (work) Blog: http://schily.blogspot.com/
URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily



reply via email to

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