[reportlab-users] ReportLab 2.0 and 1.21 .tgz files on site corrupted?

Tim Roberts timr at probo.com
Wed Aug 2 13:38:08 EDT 2006

On Tue, 01 Aug 2006 10:23:22 -0700, Tim Roberts <timr at probo.com> wrote:

>On Tue, 1 Aug 2006 21:05:10 +0530, "Vasudev Ram" <vrtech at gmail.com> wrote:
>>>Tried downloading them (ReportLab 2.0 and 1.21 .tgz files - from the
>>>ReportLab.org site) a couple of times, recently.
>>>Download went ok. When I tried to unzip with WinZip, showed the same file
>>>name (the .tgz) recursively inside the original .tgz after expanding to
>>>.tar. Then when I double-clicked on this second (embedded) .tgz file, it
>>>showed an Add to Zip file dialog, instead of extracting it.
>>>This happened both times, for both the 2.0 and 1.21 .tgz's.
>>>What's up?
>My guess is that Winzip is just stupid about tgz files.  There's nothing
>wrong with the files.  Why don't you grab the zip files instead?  Those
>are the ones intended for Windows.

I decided to do a little more experimentation today, and it appears that
there *IS* something unusual in the tgz files.

tar and gzip are not tightly integrated, the way zip is.  The tar
command creates an uncompressed archive with all of the component
files.  Then, in a separate step, gzip compresses THAT file into another
file, usually given a .tgz suffix.  When you run "tar cvfz" on Linux to
create a compressed tar, it's actually running the two commands (tar and
gzip) separately.

So, in the normal case, tar creates MyArchive.tar, and then gzip
compresses that into MyArchive.tgz, which contains one file
(MyArchive.tar).  When you run "tar xvfz" to uncompress that, tar
launches a gunzip command, and reads its output directly.  Because of
that, the embedded file name doesn't matter; no one ever sees it. 
However, tools like WinZip and 7Zip want to treat it like a zip file, so
they care about the embedded file name.

In the case of ReportLab_2_0.tgz, the name of the embedded uncompressed
file is ReportLab_2_0.tgz. That's what WinZip complained about.  7Zip
will correctly uncompress it to a tar file (with a tgz extension), but
it warns about the duplicate file name.

A very interesting little issue...

Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.

More information about the reportlab-users mailing list