You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Marcel Bruch <br...@cs.tu-darmstadt.de> on 2012/05/25 16:21:32 UTC

[compress] in-place updates of archive contents

Hi,

I'm looking for a archive format and library that allows to update a archive entry w/o copying the whole file as necessary with zip file format.

From what I've seen, tar may be possible but the compress API does not state this use case explicitly? Is this supported?
I also saw the ChangeSetPerformer API but the test cases mostly use cpio and zip, Thus, I'm not sure.

Thanks for any pointers on how to create an updatable archive w/o copying a 1gb++ archive again.

Marcel
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [compress] in-place updates of archive contents

Posted by Stefan Bodewig <bo...@apache.org>.
On 2012-05-25, Marcel Bruch wrote:

> is there any support for just appending new entries to an existing file?

Since you decide about the stream you pass in to the ArchiveOutputStream
yourself you can hand over a FileOutputStream that is appending.  This
should work for tar, cpio and ar but won't work for zip with the central
directory at the end of the file.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [compress] in-place updates of archive contents

Posted by Marcel Bruch <br...@cs.tu-darmstadt.de>.
Thanks Stefan.

is there any support for just appending new entries to an existing file?


On 25.05.2012, at 16:31, Stefan Bodewig wrote:

> Hi Marcel,
> 
> On 2012-05-25, Marcel Bruch wrote:
> 
>> I'm looking for a archive format and library that allows to update a
>> archive entry w/o copying the whole file as necessary with zip file
>> format.
> 
>> From what I've seen, tar may be possible but the compress API does not
>> state this use case explicitly? Is this supported?
> 
> No, it is not, at least not explicitly.
> 
>> I also saw the ChangeSetPerformer API but the test cases mostly use
>> cpio and zip, Thus, I'm not sure.
> 
> The changeset stuff is supposed to work for all archiving types (for
> which we support writing, dump is read-only) - but it works by using
> (temporary) copies as well.
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org

Thanks,
Marcel

-- 
Eclipse Code Recommenders:
 w www.eclipse.org/recommenders
 tw www.twitter.com/marcelbruch
 g+ www.gplus.to/marcelbruch


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [compress] in-place updates of archive contents

Posted by Stefan Bodewig <bo...@apache.org>.
Hi Marcel,

On 2012-05-25, Marcel Bruch wrote:

> I'm looking for a archive format and library that allows to update a
> archive entry w/o copying the whole file as necessary with zip file
> format.

> From what I've seen, tar may be possible but the compress API does not
> state this use case explicitly? Is this supported?

No, it is not, at least not explicitly.

> I also saw the ChangeSetPerformer API but the test cases mostly use
> cpio and zip, Thus, I'm not sure.

The changeset stuff is supposed to work for all archiving types (for
which we support writing, dump is read-only) - but it works by using
(temporary) copies as well.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org