Skip to content

Core\Zip

Reads zip archives. entries lists the names in an archive, read returns one file from it, and extract writes its files into a folder. Every archive is checked before any name or file is returned. An archive with an unsafe name, such as ../config.php, throws a ParseError.

Members

3 members.

MemberSignature
entriesentries(Core\Bytes::Source $archive): array<tainted string>
readread(Core\Bytes::Source $archive, string $name, uint $maxBytes = 67108864, uint $maxRatio = 1000): tainted bytes
extractextract(Core\Bytes::Source $archive, string $destination, uint $maxBytes = 67108864, uint $maxRatio = 1000): uint