| | private function isTreeData( string $data ): bool { |
| | $result = false; |
| | - $pattern = '/^(40000|100644|100755|120000) /'; |
| | + $pattern = '/^(40000|100644|100755|120000|160000) /'; |
| | |
| | if( strlen( $data ) >= 25 && preg_match( $pattern, $data ) ) { |
 |
| | $negOffset = (($negOffset + 1) << 7) | ($byte & 127); |
| | } |
| | + |
| | + // Capture the current position (start of delta data) |
| | + $currentPos = ftell( $fileHandle ); |
| | |
| | + // Recursive call moves the file pointer |
| | $base = $this->readPackEntry( $fileHandle, $offset - $negOffset ); |
| | + |
| | + // Restore the position to read the delta data |
| | + fseek( $fileHandle, $currentPos ); |
| | + |
| | $delta = @gzuncompress( fread( $fileHandle, self::MAX_READ ) ) ?: ''; |
| | |