Closed mzghoba closed 1 year ago
Does the Archive Utility support files using zip64?
Yes, I tried macOS archive utility, Keka app, and ditto CLI. The same error. But it works fine for zip64 without empty folders
I did the same test, see https://plnkr.co/edit/qFaB9prJCyYSiVjv?open=lib%2Fscript.js&preview. I can extract the file with 7-zip, WinZip, and natively with the File Explorer on Windows 11 without any warning. From my point of view, it's a bug on macOS because directories have nothing particular with zip64 enabled.
Anyway, you should not force zip64
to true
unless you know what you're doing. zip.js can detect when to set to it true
automatically.
Actually, there might be something wrong. 7z
confirms the entry is not detected as written in zip64, see Characteristics
Volume index
and Offset
of the second entry.
7z l hello.zip -slt
7-Zip [64] 17.05 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.05 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,8 CPUs LE)
Scanning the drive for archives:
1 file, 1191 bytes (2 KiB)
Listing archive: hello(19).zip
--
Path = hello(19).zip
Type = zip
Physical Size = 1191
64-bit = +
Characteristics = Zip64
----------
Path = lorem.txt
Folder = -
Size = 1162
Packed Size = 629
Modified = 2023-04-13 02:23:34
Created = 2023-04-13 02:23:34
Accessed = 2023-04-13 02:23:34
Attributes =
Encrypted = -
Comment =
CRC = 869415C8
Method = Deflate
Characteristics = Zip64 UT NTFS : Descriptor UTF8
Host OS = FAT
Version = 45
Volume Index = 0
Offset = 0
Path = test
Folder = +
Size = 0
Packed Size = 0
Modified = 2023-04-13 02:23:34
Created = 2023-04-13 02:23:34
Accessed = 2023-04-13 02:23:34
Attributes = D
Encrypted = -
Comment =
CRC =
Method = Store
Characteristics = 0x0 0x0 0x0 0x0 0x0 0x2DD 0x0 0x0 UT NTFS : Descriptor UTF8
Host OS = FAT
Version = 45
Volume Index = 65535
Offset = 4294967295
Thank you for the report. The bug is fixed in the version 2.7.2
. The generated zip file is now valid on https://plnkr.co/edit/qFaB9prJCyYSiVjv?open=lib%2Fscript.js&preview.
For the record, 7z
now displays the following result.
7z l hello.zip -slt
7-Zip [64] 17.05 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.05 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,8 CPUs LE)
Scanning the drive for archives:
1 file, 1191 bytes (2 KiB)
Listing archive: hello.zip
--
Path = hello.zip
Type = zip
Physical Size = 1191
64-bit = +
Characteristics = Zip64
----------
Path = lorem.txt
Folder = -
Size = 1162
Packed Size = 629
Modified = 2023-04-13 02:54:07
Created = 2023-04-13 02:54:07
Accessed = 2023-04-13 02:54:07
Attributes =
Encrypted = -
Comment =
CRC = 869415C8
Method = Deflate
Characteristics = Zip64 UT NTFS : Descriptor UTF8
Host OS = FAT
Version = 45
Volume Index = 0
Offset = 0
Path = test
Folder = +
Size = 0
Packed Size = 0
Modified = 2023-04-13 02:54:07
Created = 2023-04-13 02:54:07
Accessed = 2023-04-13 02:54:07
Attributes = D
Encrypted = -
Comment =
CRC =
Method = Store
Characteristics = Zip64 UT NTFS : Descriptor UTF8
Host OS = FAT
Version = 45
Volume Index = 0
Offset = 733
The Characteristics
, Volume index
and Offset
values of the second entry are now correct.
Thank you!
You're welcome.
Unable to unzip the archive with few files and empty folders. ZipWriter should have zip64 and level options
Result