Skip to content

Commit

Permalink
Merge pull request #17 from digitaldogsbody/issue-12
Browse files Browse the repository at this point in the history
Fix missed update to LFH optimisation
  • Loading branch information
digitaldogsbody committed Oct 5, 2022
2 parents e117fe7 + b31dafe commit 7be7eef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ZipRangeReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public function getStream(string $path) {
}

// Retrieve the length of the filename and extra field from the Local File Header
$lfh_field_lengths = unpack("v2", $this->seeker->retrieveStart(30, $file["offset"]+26));
$lfh_field_lengths = unpack("v2", $this->seeker->retrieveStart(4, $file["offset"]+26));

// Calculate the offset of the compressed data (File offset + LFH length + file name length + extra field length)
$data_offset = $file["offset"] + 30 + $lfh_field_lengths[1] + $lfh_field_lengths[2];
Expand Down

0 comments on commit 7be7eef

Please sign in to comment.