Atom

archive.unzip()

Extracts ZIP file contents to memory.

Signature

archive.unzip(data[, max_output])

Parameters

Packed ZIP bytes or text byte span, and optional nonnegative signed total extraction cap, default 64 MiB.

Returns

Dictionary of names to packed u8 data.

Behavior

Skips directory entries and validates each filename.

Errors

Invalid archive, duplicate/unsafe name, failed extraction or cap exceeded.

Example

Atom
use archive
use binary
z = archive.zip({['note.txt'] = 'Atom'})
assert(binary.text(archive.unzip(z)['note.txt']) == 'Atom')