[delphizip] Re: Problem using ExtractFileToStream

  • From: "R.Peters" <russellpeters@xxxxxxxxxxx>
  • To: delphizip@xxxxxxxxxxxxx
  • Date: Sat, 07 Oct 2006 08:05:35 +1000

I had just digging through to the same point and I strongly suspect that 
the zip local header sizes are not correct (non-conforming zip file).
With WinZip10 (I think) you can test this by looking at the detailed 
report for the file.
File -> Properties -> Detail
 this tests the file and I think would catch any problems.
The file is a bit large to email for me to test but, if needed, I could 
set up ftp access.
In future versions, for security reasons, the sizes and names will have 
to match but at least it will tell of any such discrepancy.
- Russell Peters
Trueman, Christopher wrote:
> 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.
>
>
>   
-----------
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: