Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-08

Don't understand Zipper.DoEndOfFile/UnZipper.DoEndOfFile

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Reinier Olislagers

I've been working on documenting the Zipper/Unzipper classes: packages\paszlib\src\zipper.pp
Now looking at the protected procedure TZipper/TUnzipper.DoEndOfFile

They apparently update compression percentage statistics and call a user defined callback (if any, defined in OnEndOfFile)

I don't understand though by whom/if they are called? A grep through the source code showed nothing referencing it.

Thanks,
Reinier

Reply by email

Michael Van Canneyt
to Reinier Olislagers
Reinier Olislagers wrote 9 lines
I've been working on documenting the Zipper/Unzipper classes: packages\paszlib\src\zipper.pp Now looking at the protected procedure TZipper/TUnzipper.DoEndOfFile They apparently update compression percentage statistics and call a user defined callback (if any, defined in OnEndOfFile) I don't understand though by whom/if they are called? A grep through the source code showed nothing referencing it.

The calls to these routines must have fallen out during some refactoring. They should be called when the zip/unzip operation is done.

Michael.

Reply by email

Reinier Olislagers
to Michael Van Canneyt
Michael Van Canneyt wrote 14 lines
On Wed, 15 Aug 2012, Reinier Olislagers wrote: > I've been working on documenting the Zipper/Unzipper classes: > packages\paszlib\src\zipper.pp > Now looking at the protected procedure TZipper/TUnzipper.DoEndOfFile > > They apparently update compression percentage statistics and call a user > defined callback (if any, defined in OnEndOfFile) > > I don't understand though by whom/if they are called? A grep through the > source code showed nothing referencing it. The calls to these routines must have fallen out during some refactoring. They should be called when the zip/unzip operation is done.

Ok, just for confirmation: done after each file in the list - as oppposed to the zip/unzip operation on the entire zip file, right?

I'll have a look through the history to see if I can find it and write up a patch.

Thanks,
Reinier

Reply by email

Michael Van Canneyt
to Reinier Olislagers
Reinier Olislagers wrote 17 lines
On 15-8-2012 13:48, Michael Van Canneyt wrote: > On Wed, 15 Aug 2012, Reinier Olislagers wrote: > >> I've been working on documenting the Zipper/Unzipper classes: >> packages\paszlib\src\zipper.pp >> Now looking at the protected procedure TZipper/TUnzipper.DoEndOfFile >> >> They apparently update compression percentage statistics and call a user >> defined callback (if any, defined in OnEndOfFile) >> >> I don't understand though by whom/if they are called? A grep through the >> source code showed nothing referencing it. > > The calls to these routines must have fallen out during some > refactoring. They should be called when the zip/unzip operation is done. Ok, just for confirmation: done after each file in the list - as oppposed to the zip/unzip operation on the entire zip file, right?

Yes.

I'll have a look through the history to see if I can find it and write up a patch.

That would be nice :)

Michael.

Reply by email

Reinier Olislagers
to Michael Van Canneyt
Michael Van Canneyt wrote 30 lines
On Wed, 15 Aug 2012, Reinier Olislagers wrote: > On 15-8-2012 13:48, Michael Van Canneyt wrote: >> On Wed, 15 Aug 2012, Reinier Olislagers wrote: >> >>> I've been working on documenting the Zipper/Unzipper classes: >>> packages\paszlib\src\zipper.pp >>> Now looking at the protected procedure TZipper/TUnzipper.DoEndOfFile >>> >>> They apparently update compression percentage statistics and call a >>> user >>> defined callback (if any, defined in OnEndOfFile) >>> >>> I don't understand though by whom/if they are called? A grep through >>> the >>> source code showed nothing referencing it. >> >> The calls to these routines must have fallen out during some >> refactoring. They should be called when the zip/unzip operation is done. > Ok, just for confirmation: done after each file in the list - as > oppposed to the zip/unzip operation on the entire zip file, right? Yes. > I'll have a look through the history to see if I can find it and write > up a patch. That would be nice :)

Nice, separated hot, fresh patches ;)
Patch for executing DoEndFile/hooking up OnEndOfFile: 22651 Basic test of zip/unzip functionality for compiler tests: 22648

Thanks,
Reinier

Reply by email