private function readEntry(array &$entries) { if (!count($entries)) { $offset = 0; } else { $last = end($entries); $offset = $last["offset"] + $last["csize"]; } $file = $this->readStringBinary($this->fd); if (!strlen($file)) { throw new Exception("Empty file name encountered at offset '{$offset}'"); } $header = $this->readFormat("Vosize/Vstamp/Vcsize/Vcrc32/Vflags", $this->fd, 20); $meta = $this->readSerializedBinary($this->fd); $entries[$file] = $header + compact("meta", "offset"); }