$binary.unzip()
Unpacks a ZIP file and makes the contained files available as a list of JSON objects.
| Name | Type | Type Description | Mandatory | Default |
|---|---|---|---|---|
| binary | Binary value | The ZIP file to be unpacked | Yes | - |
Type: List of JSON objects
An entry with the following fields for each file contained in the ZIP file:
The unpacked binary data of the entry.data
The file name of the unpacked file.name
comment An optional comment
compressedSize The size of the compressed content.
crc The CRC checksum of the content.
extra Optional binary data assigned to the content.
creationTime The date the content was last modified.
lastAccessTime The date the content was last accessed.
lastModifiedTime The date the content was last modified.
method The compression method, either "deflated" or "stored".
size The unpacked size of the content.
$zip.unzip().map(entry -> $entry["size"]).sum()
Output: The total size to be expected when unpacking the transferred ZIP file $zip.