# std.zip: Add ZIP64 support for local file header extra field · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/f9a43770c87d4475a8e05b6539917ee26172b7c6)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: f9a43770c87d4475a8e05b6539917ee26172b7c6

Requested commit: f9a43770c87d4475a8e05b6539917ee26172b7c6

Commit: f9a43770c87d4475a8e05b6539917ee26172b7c6

Tree: 9b46610062fd58a0d15d441308f3d74c448ed612

Author: axel escalada

Committer: GitHub

## Message

```
std.zip: Add ZIP64 support for local file header extra field

This PR adds support for handling ZIP64 format in local file headers,
when a zip file contains entries where the compressed or uncompressed
size fields are set to 0xFFFFFFFF, and the extra field contains ZIP64
extended information tag (0x0001)

The code now:

Reads the actual sizes from the ZIP64 extra field data
Validates these sizes against the entry's compressed and uncompressed sizes

Zip file format spec.: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

This change allows proper extraction of ZIP files that use ZIP64 format in their
local file headers.

Fixes: #22329
```

## Parents

- [c748eb2416d067688d1f4f40af78478e7dfdc4bf](https://git.cafe/gitcafe/zig/commit/c748eb2416d067688d1f4f40af78478e7dfdc4bf?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/f9a43770c87d4475a8e05b6539917ee26172b7c6?format=markdown)
