commit 16e0c5fb3a865dcc6c5f0c78432240652735f741 from: Omar Polo date: Sat Aug 21 11:13:30 2021 UTC typo x 2 commit - abac85a73f6244d1e8105320ac092d146a207c4b commit + 16e0c5fb3a865dcc6c5f0c78432240652735f741 blob - 9e4cbab17f06d8de91f87a17421e5795dafa3676 blob + e5e6b58a7acad4fed4d18a392981ffc878dc26b0 --- resources/posts/extracting-from-zips.gmi +++ resources/posts/extracting-from-zips.gmi @@ -169,7 +169,7 @@ Here’s the two constants for the compression methods The other algorithms and their codes are described at length in the zip documentation. -The unzip functions takes the zip and the pointer to the file entry in the central directory, then finds the offset inside the file and computes the pointer to the start of the actual data. The file record header is variable with: it’s made by 46 bytes followed by two variable-width fields “file name” and “extra field”. +The unzip functions takes the zip and the pointer to the file entry in the central directory, then finds the offset inside the file and computes the pointer to the start of the actual data. The file record header has a variable width: it’s made by 46 bytes followed by two variable-width fields “file name” and “extra field”. To know the compression method we need to read the compression field, an integer two bytes long starting at offset 8. (see the previous post or the official documentation for the structure of the headers)