[delphizip] Re: Problem using ExtractFileToStream

  • From: "Trueman, Christopher" <ctrueman@xxxxxxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Fri, 6 Oct 2006 14:35:59 -0700

I dug out a copy of BCB 5 and made a local version of DelZip179.DLL with
some more logging.

I found that for my specialized JAR file ZIP in ZIP case, the function
open_outfile() was failing here:

   if ( pG->redirect_data )
   {
      Notify(PF, IVERBOSE, "redirect_size (%u); lrec.ucsize (%u)",
pG->redirect_size, pG->lrec.ucsize);

        return ( pG->redirect_size !=3D pG->lrec.ucsize );
   }  =20

pG->redirect_size never matched pG->lrec.ucsize.  In fact
pG->lrec.ucsize is 0 for all my ZIP entries irrespective of if it is a
ZIP in a ZIP or just a regular file in a ZIP.

It seems that the central record that feeds the DirEntry list reads its
data from the central ZIP directory.  There, the compressed and
uncompressed (pG->crec.csize and pG->crec.ucsize) property values are
correct (WinZip 10 reports the same values).

Not knowing enough about the ZIP format or the DelZip implementation I
am not sure how to proceed.

Thoughts:

* Is my specialized JAR file not really a valid ZIP?

* Is the local record strictly necessary to support the decompression of
a file.  Extract seems to work OK without it, but I've not debugged
through that.

Comments welcomed.



Chris.

> The original ZIP is 4.5MB.  The contained ZIP is 2K when=20
> extracted with WinZip 10.
>=20
> The original file and the contained files are, I'm pretty=20
> sure, just a Java JAR formatted file which I understood was=20
> built on the ZIP format.
>=20
>=20
> I have DelZip179.DLL.

<snip>

_______________________________________________________
The contents of this e-mail are intended for the named addressee only. =
It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or =
disclose
it to anyone else. If you received it in error please notify the sender=20
immediately, and then destroy it.

-----------
To unsubscribe from this list, send an empty e-mail 
message to:
  delphizip-request@xxxxxxxxxxxxx 
and put the word unsubscribe in the subject.

Other related posts: