We are streaming lots of archives with zstream. It works very well except the native Xiaomi archiver utility, that fails to unzip a zip64 archive. The first idea was that this is a bug in that utility, but it handles zip64 archives from another streaming solution mod_zip with no issues.
Another hint that something might be wrong with zip64 format is that zipdetails mac/linux util fails to display zstreams zip64 details. Here is an example script and files.
Zstream.zip([
Zstream.entry("test/10.txt", File.stream!("10.txt", [], 512), coder: Zstream.Coder.Stored)
])
|> Stream.into(File.stream!("/tmp/test.zip"))
|> Stream.run
Zstream.zip([
Zstream.entry("test/10.txt", File.stream!("10.txt", [], 512), coder: Zstream.Coder.Stored)
], zip64: true)
|> Stream.into(File.stream!("/tmp/test_zip64.zip"))
|> Stream.run
$ zipdetails /tmp/test.zip
0000 LOCAL HEADER #1 04034B50
0004 Extract Zip Spec 14 '2.0'
0005 Extract OS 00 'MS-DOS'
0006 General Purpose Flag 0808
[Bit 3] 1 'Streamed'
[Bit 11] 1 'Language Encoding'
0008 Compression Method 0000 'Stored'
000A Last Mod Time 56385EDD 'Tue Jan 24 11:54:58 2023'
000E CRC 00000000
0012 Compressed Length 00000000
0016 Uncompressed Length 00000000
001A Filename Length 000B
001C Extra Length 0000
001E Filename 'test/10.txt'
0029 PAYLOAD 123456789.
0033 STREAMING DATA HEADER 08074B50
0037 CRC E0117757
003B Compressed Length 0000000A
003F Uncompressed Length 0000000A
0043 CENTRAL HEADER #1 02014B50
0047 Created Zip Spec 34 '5.2'
0048 Created OS 00 'MS-DOS'
0049 Extract Zip Spec 14 '2.0'
004A Extract OS 00 'MS-DOS'
004B General Purpose Flag 0808
[Bit 3] 1 'Streamed'
[Bit 11] 1 'Language Encoding'
004D Compression Method 0000 'Stored'
004F Last Mod Time 56385EDD 'Tue Jan 24 11:54:58 2023'
0053 CRC E0117757
0057 Compressed Length 0000000A
005B Uncompressed Length 0000000A
005F Filename Length 000B
0061 Extra Length 0000
0063 Comment Length 0000
0065 Disk Start 0000
0067 Int File Attributes 0000
[Bit 0] 0 'Binary Data'
0069 Ext File Attributes 81A40000
006D Local Header Offset 00000000
0071 Filename 'test/10.txt'
007C END CENTRAL HEADER 06054B50
0080 Number of this disk 0000
0082 Central Dir Disk no 0000
0084 Entries in this disk 0001
0086 Total Entries 0001
0088 Size of Central Dir 00000039
008C Offset to Central Dir 00000043
0090 Comment Length 0012
0092 Comment 'Created by Zstream'
Done
$ zipdetails /tmp/test_zip64.zip
0000 PREFIX DATA
Done
10.txt
test.zip
test_zip64.zip
We are streaming lots of archives with
zstream. It works very well except the native Xiaomi archiver utility, that fails to unzip azip64archive. The first idea was that this is a bug in that utility, but it handleszip64archives from another streaming solution mod_zip with no issues.Another hint that something might be wrong with
zip64format is thatzipdetailsmac/linux util fails to displayzstreams zip64 details. Here is an example script and files.10.txt
test.zip
test_zip64.zip