[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Fixed: Re: Zip problems (Re: (no subject))
From:       Nicolas Goutte <nicog () snafu ! de>
Date:       2002-11-18 21:22:29
[Download RAW message or body]

On Monday 18 November 2002 22:11, Percy Leonhardt wrote:
> On Monday 18 November 2002 19:29, David Faure wrote:
> > Are you sure there's no other way than a linear search ???
> > This sounds utterly broken and slow...
> >
> > Even if there isn't a way to know where to seek directly, I think the
> > idea is rather to "read the header for an entry, skip it (after findi=
ng
> > out its length), read the next header, etc." until finding the header=
 for
> > the central block.
> > That's what the code in openArchive tries to do, but for some reason =
it
> > can't properly find out the size of the first entry, to know how much=
 to
> > skip...
>
> The reason is, that there is a flag in the header (that KZip ignores) t=
hat
> says that the size of the zipped data is not stored in the header but
> instead in a section behind the zipped data. So it's not possible to kn=
ow
> how much to skip until you have actually skipped the data and found tha=
t
> section.
>
> The OO files are the only zipfiles I found with this flag set but this =
flag
> is mentioned in the PKZIP whitepaper, so it seems to be 'official'.
>
> I implemented the linear search and the bug is solved. KZiptest now sho=
ws
> the contents of the OO files. I would have added a patch but 'cvs diff'
> somehow shows lines I haven't touched... so the diff looks a bit confus=
ing.

Try:
cvs diff -b

>
> David, do you want to review the new kzip.cpp? I can send it by private
> mail.
>
> =09Percy

Have a nice day/evening/night!

> _______________________________________________
> koffice-devel mailing list
> koffice-devel@mail.kde.org
> http://mail.kde.org/mailman/listinfo/koffice-devel

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic