weichsel / ZIPFoundation

Effortless ZIP Handling in Swift
MIT License
2.31k stars 255 forks source link

Makes Entry.dataOffset public #277

Closed bitwisejb closed 10 months ago

bitwisejb commented 1 year ago

Fixes https://github.com/weichsel/ZIPFoundation/issues/274

Changes proposed in this PR

The archive I am working with has map imagery stored in a folder structure designating levels and tile positions. One entry in the archive is an index for locating tile image data for a given xyz. We use xyz to determine the entry and offset for the image to extract. Byte count is known to us based on information in the index entry.

This change exposes Entry.dataOffset. This will allow other applications to pull raw bytes out of the archive given he entry and byte count.