Skip to content

PKZip.ZipReader.Constructor

Andrew Lambert edited this page Nov 26, 2022 · 4 revisions

PKZip.ZipReader.Constructor

Method Signatures

 Sub Constructor(ZipData As MemoryBlock, Force As Boolean = False)
 Sub Constructor(ZipStream As BinaryStream, Force As Boolean = False)
 Sub Constructor(ZipStream As FolderItem, Force As Boolean = False)

Parameters

Constructor(MemoryBlock, Boolean)

Name Type Comment
ZipData MemoryBlock The zip archive to read from.
Force Boolean Optional. If True, then the archive is forcibly read.

Constructor(BinaryStream, Boolean)

Name Type Comment
ZipStream BinaryStream The zip archive to read from.
Force Boolean Optional. If True, then the archive is forcibly read.

Constructor(FolderItem, Boolean)

Name Type Comment
ZipStream FolderItem The zip archive to read from.
Force Boolean Optional. If True, then the archive is forcibly read.

Remarks

Opens the archive for reading.

If Force=True then less strict techniques are used:

  • The zip data is assumed to start at offset 0
  • The central directory is ignored
  • Invalid entries are skipped by scanning forward until the next entry is found (slow)
  • Checksum mismatches will not cause MoveNext() to return False (LastError is updated correctly, though)

Forcible reading can yield a performance boost on well-formed archives.

Entry-level points of interest denoted by "☜"



Clone this wiki locally