Home > Mobile >  Delphi TZip failing if archive contains > 64k files
Delphi TZip failing if archive contains > 64k files

Time:09-21

I just hit what appears to be an annoying limitation in Delphi.

My archive has 117,898 files in it (they're all 256x256 JPEG images so stored without ZIP compression - ZIPs just a delivery mechanism)

Anyway, I just moved up from my previous ZIP which had 24,989 images to the new one and it stops at 65536 files (i.e. index = 65535) then Range errors on me.

It, therefore appears that TZip is 16 bit (or I'm doing something emensely stupid)

I just discovered that Delphi 11 has 64 bit support - but that's also limited to 64k files

CodePudding user response:

Have you tried using the 7zip library? Or even, where is traversing these files using a TParallel.For

Could be a processing limitation

CodePudding user response:

That is not an annoying Delphi limitation, but a limitation of the ZIP specification as can be seen here: APPNOTE.TXT

In section 4.3.16 the total number of entries in the central directory has only 2 bytes.

  • Related