2022-09-22 19:32:13 +03:00
|
|
|
$ fq -h zip
|
|
|
|
zip: ZIP archive decoder
|
|
|
|
|
|
|
|
Options
|
|
|
|
=======
|
|
|
|
|
|
|
|
uncompress=true Uncompress and probe files
|
|
|
|
|
|
|
|
Decode examples
|
|
|
|
===============
|
|
|
|
|
|
|
|
# Decode file as zip
|
|
|
|
$ fq -d zip . file
|
|
|
|
# Decode value as zip
|
|
|
|
... | zip
|
|
|
|
# Decode file using zip options
|
|
|
|
$ fq -d zip -o uncompress=true . file
|
|
|
|
# Decode value as zip
|
|
|
|
... | zip({uncompress:true})
|
|
|
|
|
|
|
|
Supports ZIP64.
|
|
|
|
|
2023-10-21 19:11:56 +03:00
|
|
|
Timestamp and time zones
|
|
|
|
========================
|
|
|
|
The timestamp accessed via .local_files[].last_modification is encoded in ZIP files using MS-DOS representation
|
|
|
|
(https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-dosdatetimetovarianttime) which lacks a known time zone.
|
|
|
|
Probably the local time/date was used at creation. The unix_guess field in last_modification is a guess assuming the local time zone
|
|
|
|
was UTC at creation.
|
|
|
|
|
2022-09-22 19:32:13 +03:00
|
|
|
References
|
|
|
|
==========
|
|
|
|
- https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
|
|
|
|
- https://opensource.apple.com/source/zip/zip-6/unzip/unzip/proginfo/extra.fld
|
2023-10-21 19:11:56 +03:00
|
|
|
- https://formats.kaitai.io/dos_datetime/
|
|
|
|
- https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-dosdatetimetovarianttime
|