#1 2022-06-26 19:35:13

tbo
Member
Registered: 2015-04-20
Posts: 335

Description of progress when working with zip files

When I look in the function TZipWrite.AddDeflated(const aZipName: TFileName; Buf: pointer; Size: PtrInt;...), only the start and the end are considered.
The description is not quite correct.

/// optional TOnInfoProgress callback triggered during Zip/Unzip
// - at least at process startup and finish, and every ReportDelay ms
property OnProgress: TOnInfoProgress
  read fInfo.OnProgress write fInfo.OnProgress;

A message after ReportDelay is never triggered for the functions:

  • AddDeflated(const aZipName: TFileName; Buf: pointer; Size: PtrInt; ...)

  • AddStored(const aZipName: TFileName; Buf: pointer; Size: PtrInt;...)

  • AddFromZip()

  • Append()

For other functions only if LIBDEFLATE_MAXSIZE is exceeded.

With best regards
Thomas

Offline

#2 2022-06-27 12:24:39

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,207
Website

Re: Description of progress when working with zip files

Yes, this is because there is no progress callback available in the in-memory process of libdeflate.

Offline

#3 2022-06-27 15:04:14

tbo
Member
Registered: 2015-04-20
Posts: 335

Re: Description of progress when working with zip files

ab wrote:

Yes, this is because there is no progress callback available in the in-memory process of libdeflate.

Sorry, I could not express my intention clearly enough. I have a problem with the word "every" in the description. I would have expected a formulation more like the following:

/// optional TOnInfoProgress callback triggered during Zip/Unzip
// - at least at startup and finish, and for functions that support ReportDelay [ms] for all longer-running processes

With best regards
Thomas

Offline

#4 2022-06-28 06:52:45

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,207
Website

Re: Description of progress when working with zip files

Offline

Board footer

Powered by FluxBB