You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Peter Lee <pe...@apache.org> on 2020/11/16 02:51:25 UTC

[Compress] COMPRESS-540 : Random access of tar

Hi all,

Robin has pushed a PR in github in July that implemented the random access of tar :
https://github.com/apache/commons-compress/pull/113
It's achieved by reading the tar once and have the start position of each tar entry stored. Tar is not designed to be random accessed so this may be a time consuming way.
IMO this is not a must feature, but it's a good idea that may be useful when we only want some specific entries in giant tars. This is a big change in tar so I want to hear your voices. WDYT?
cheers,
Lee

Re: [Compress] COMPRESS-540 : Random access of tar

Posted by Peter Lee <pe...@apache.org>.
Agree.

Seems this random access was achieved with a new class TarFile and it won't have effects on existing apps.
Tars are designed to be a sequence access format so a random access would cost more time. I'm just curious how much do we want to have a random access here? I mean, do we always need a random access to a tarball? Is this a reasonable trade off?
cheers,
Lee
On 11 16 2020, at 8:23 , Gary Gregory <ga...@gmail.com> wrote:
> Reading in everything to allow for random access should be something I have
> to turn on explicitly, using a new parameter/API. IOW, existing apps should
> not have to pay the price for a feature they don't want. Think of an app
> that looks at large tar...
>
> Gary
> On Sun, Nov 15, 2020, 21:51 Peter Lee <pe...@apache.org> wrote:
> > Hi all,
> >
> > Robin has pushed a PR in github in July that implemented the random access
> > of tar :
> > https://github.com/apache/commons-compress/pull/113
> > It's achieved by reading the tar once and have the start position of each
> > tar entry stored. Tar is not designed to be random accessed so this may be
> > a time consuming way.
> > IMO this is not a must feature, but it's a good idea that may be useful
> > when we only want some specific entries in giant tars. This is a big change
> > in tar so I want to hear your voices. WDYT?
> > cheers,
> > Lee
> >
>


Re: [Compress] COMPRESS-540 : Random access of tar

Posted by Gary Gregory <ga...@gmail.com>.
Reading in everything to allow for random access should be something I have
to turn on explicitly, using a new parameter/API. IOW, existing apps should
not have to pay the price for a feature they don't want. Think of an app
that looks at large tar...

Gary

On Sun, Nov 15, 2020, 21:51 Peter Lee <pe...@apache.org> wrote:

> Hi all,
>
> Robin has pushed a PR in github in July that implemented the random access
> of tar :
> https://github.com/apache/commons-compress/pull/113
> It's achieved by reading the tar once and have the start position of each
> tar entry stored. Tar is not designed to be random accessed so this may be
> a time consuming way.
> IMO this is not a must feature, but it's a good idea that may be useful
> when we only want some specific entries in giant tars. This is a big change
> in tar so I want to hear your voices. WDYT?
> cheers,
> Lee
>

Re: [Compress] COMPRESS-540 : Random access of tar

Posted by Peter Lee <pe...@apache.org>.
Thanks Bruno.
This helps a lot. :)

cheers,
Lee

On 11 16 2020, at 1:45 , Bruno P. Kinoshita <ki...@apache.org> wrote:
> Hi Lee,
> I don't know much about Compress' API, only as a user of the API in some projects.
> I had a cursory look, read comments and JIRA and left comments on GitHub PR. No blockers for me. Hope it helps.
> Thanks for bringing it to the mailing list, and for the review.
> CheersBruno
>
> On Monday, 16 November 2020, 3:51:48 pm NZDT, Peter Lee <pe...@apache.org> wrote:
> Hi all,
> Robin has pushed a PR in github in July that implemented the random access of tar :
> https://github.com/apache/commons-compress/pull/113
> It's achieved by reading the tar once and have the start position of each tar entry stored. Tar is not designed to be random accessed so this may be a time consuming way.
> IMO this is not a must feature, but it's a good idea that may be useful when we only want some specific entries in giant tars. This is a big change in tar so I want to hear your voices. WDYT?
> cheers,
> Lee
>


Re: [Compress] COMPRESS-540 : Random access of tar

Posted by "Bruno P. Kinoshita" <ki...@apache.org>.
 Hi Lee,
I don't know much about Compress' API, only as a user of the API in some projects.
I had a cursory look, read comments and JIRA and left comments on GitHub PR. No blockers for me. Hope it helps.
Thanks for bringing it to the mailing list, and for the review.
CheersBruno

    On Monday, 16 November 2020, 3:51:48 pm NZDT, Peter Lee <pe...@apache.org> wrote:  
 
 Hi all,

Robin has pushed a PR in github in July that implemented the random access of tar :
https://github.com/apache/commons-compress/pull/113
It's achieved by reading the tar once and have the start position of each tar entry stored. Tar is not designed to be random accessed so this may be a time consuming way.
IMO this is not a must feature, but it's a good idea that may be useful when we only want some specific entries in giant tars. This is a big change in tar so I want to hear your voices. WDYT?
cheers,
Lee