diff --git a/README.md b/README.md index fac62db..72e1b58 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ ### Features: -- Support all 7-zip formats: `7z`, `XZ`, `BZIP2`, `GZIP`, `TAR`, `ZIP`, `WIM`, `AR`, `ARJ`, `CAB`, `CHM`, `CPIO`, `CramFS`, `DMG`, `EXT`, `FAT`, `GPT`, `HFS`, `IHEX`, `ISO`, `LZH`, `LZMA`, `MBR`, `MSI`, `NSIS`, `NTFS`, `QCOW2`, `RAR`, `RPM`, `SquashFS`, `UDF`, `UEFI`, `VDI`, `VHD`, `VMDK`, `WIM`, `XAR` and `Z` -- Unpacking archives -- Extract any directory or file +- Supported all 7-zip formats: + - Packing / unpacking: `7z`, `XZ`, `BZIP2`, `GZIP`, `TAR`, `ZIP` and `WIM`. + - Unpacking only: `APFS`, `AR`, `ARJ`, `Base64`, `CAB`, `CHM`, `CPIO`, `CramFS`, `DMG`, `EXT`, `FAT`, `GPT`, `HFS`, `IHEX`, `ISO`, `LZH`, `LZMA`, `MBR`, `MSI`, `NSIS`, `NTFS`, `QCOW2`, `RAR`, `RPM`, `SquashFS`, `UDF`, `UEFI`, `VDI`, `VHD`, `VHDX`, `VMDK`, `XAR` and `Z`. - List files and directories - Get contents of any file from archive -- Delete files or directories (not `RAR`) -- Add files or directories (not `RAR`) +- Delete files or directories +- Add files or directories ### Requirements: @@ -21,7 +21,7 @@ - PHP >= 8.0.2 - allow [proc_open](https://www.php.net/proc_open) function - for Windows: 7-zip >= 7.30 (https://www.7-zip.org/) -- for Linux/MacOs: p7zip >= 9.38 (https://github.com/p7zip-project/p7zip). UPD: original 7-zip supports linux since 21.01 version? +- for Linux/MacOs: 7-zip >= 21.01 or p7zip >= 9.38 (https://github.com/p7zip-project/p7zip) ### Installation: diff --git a/src/Archive7z.php b/src/Archive7z.php index 3af22dd..d6ef9ca 100644 --- a/src/Archive7z.php +++ b/src/Archive7z.php @@ -1,5 +1,7 @@ $value) { @@ -76,11 +81,11 @@ private function parseHeader(array $headerData): void break; case 'Physical Size': - $this->physicalSize = $value; + $this->physicalSize = (int) $value; break; case 'Headers Size': - $this->headersSize = $value; + $this->headersSize = (int) $value; break; case 'Method': @@ -92,7 +97,7 @@ private function parseHeader(array $headerData): void break; case 'Blocks': - $this->blocks = $value; + $this->blocks = (int) $value; break; case 'Code Page': diff --git a/src/Parser.php b/src/Parser.php index 825016a..fb54d1f 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -1,5 +1,7 @@