Menu

Feature request: tar.gz improvement

2011-02-16
2012-12-07
  • Daemon Reddius

    Daemon Reddius - 2011-02-16

    actually under windows (i don't know if it is the same under other operative systems)

    to open a file.tar.gz you need to uncompress it twice. You should enable a some sort of feature that automatically extraxt also the tar file from the tar.gz instead of extracting first the gz and after that the tar file.

    adding also the chance to choose from the menu the tar.gz format for compressing instead of open the compression interface twice would be great!

    ;-)

     
  • Lirya

    Lirya - 2011-02-16

    Hi,
    I guess that would include taking control over the user's habits.
    You would need to open the .gz and search in there if there is just one tar.
    If yes, you would go and expand it, without asking the user. What if you just want to extract the tar to your drive, without 'expanding' it?
    Technically these are really two different steps.
    Also technically "tar" is not about compressing afaik.

     
  • SeldomGood

    SeldomGood - 2011-02-19

    gzip is a "single-stream compressor" so it is one tar file inside une gz file.

    Technically you can send to gzip the concatenation of several files, but they would subsequently be extracted as one file and then you would to know how to split it correctly into the originals: that is the task of tar.

    the nly reason toextract the tar file as a whole, would be to recompress it with a different "single-stream compressor" sucha as bzip2 or lzma, saving the trouble to extract all files from the tar and then recreate the it before recompression, for all other purposes the two steps of  "gunzipping" and "untarring" can be automatic. The real question is: which is the most common operation? recompressing the tar  or extracting/inspecting/verifiiyng its contents?
    Since I believe the former to be more of a special case, it makes sense that it is allowed by a specific option, while other operations use the requested feature by default.

    Then again, 7-zip's architechture may be such that this feature is not exactly trivial to implement  and Igor Pavlov may be more interested in developing other areas of his software at the moment.

     
  • Roger Pack

    Roger Pack - 2011-02-23

    +1
    (It's the equivalent of tar -xzf - all in one option, and I'd guess the most commonly used option out there, for untarring).

     
  • dos386

    dos386 - 2011-02-24

    By default only extract the single TAR.

    Optional piping support for any archive types (TAR inside 7-ZIP, ISO inside ZIP, …).

     
  • umbra

    umbra - 2011-02-24

    Optional piping support for any archive types (TAR inside 7-ZIP, ISO inside ZIP, …).

    Compressed ISOs are not very common (usually it's useless). And I have seen only a few nested archives, most of the time for no valid reason. There could be dozens of such combinations, which might be hard to maintain. So I'm against it.

    On the other side .tgz (or .tar.gz if you like) is widely used and kinda standard. So I'd like the possibility to extract it in a single step.

     
  • dos386

    dos386 - 2011-03-03

    > Compressed ISOs are not very common (usually it's useless)

    NO

    > And I have seen only a few nested archives, most of the time for no valid reason

    I have many and reasons are good :-)

    > There could be dozens of such combinations

    Right …

    > which might be hard to maintain

    Not if implemented a good generic way, rather than one-big-hack-per-combination ;-)

     
  • Roger Pack

    Roger Pack - 2011-03-03

    generic as fine, as long as it meets the single "95% most common" case of what I believe to be .tgz/.tar.gz
    For other combinations, you can already use an "extract from here" program if you so desire.

     
  • Josef H. B. Schneider

    I would also love to be able to create and open *.tar.gz/bz_/xz in one step.
    If some people want to extract the tar for whatever reason, this could be an option.
    But normaly if I get a *.tag.xz/bz/gz file, I want to extract the files from the tar.
    Same with creating! I almost never create a *.tar file, except to compress it.

     
  • Lirya

    Lirya - 2011-03-15

    My dear forum-comrades who so strongly like tar/gz in one step,

    would you please look at linuxjosef's post here above mine? Now back to mine!
    Sadly…. (ok ok) it should be clear now that you guys either don't like to work a little,
    or you don't fully understand.

    Keep in mind that these in fact *are* technically 2 totally different steps!
    Also they are being used because of a technological-dinosour-disadvantage of gz - it can compress only one file!
    So what do you do when you just can compress one file? You put those million files you want compressed together into one file (tar) and then gz it.
    Sooo nice idea it seemed back then… well it's crap (as you can see - resulting from your wishes).

    So lets recap (what we learned, shall we?):
    1) put those files together in one TAR
    2) put this tar through gz to compress it

    So - of course EVERYTHING is possible in IT (btw: which is why there are so many idiots requesting crap (not that I would mean you fellow forum folks with this…))
    you can, of course, put these 2 processes somehow closer together, but you can't put it into really just one step (without rewriting the compressor or loosing compatibility).

    So, if you have a little bit of time do us all a favour and create a script and put it here which will:
    1. uncompress: unpack an gz, pipe it to untar, untar it
    2. compress: pipe files to a tar, pipe this tar (while its building up) to gz -> get one big file.

    Thanks.

     

Log in to post a comment.

MongoDB Logo MongoDB