Archives as hostile input.
The portable part checks a list of entry names and an entries map {path -> text}. Reading the ZIP container itself is platform-specific; on the JVM and .NET, read-zip reads it from the central directory with caps enforced while reading, never extracting to disk.
Archives as hostile input.
The portable part checks a list of entry names and an entries map
{path -> text}. Reading the ZIP container itself is platform-specific; on
the JVM and .NET, read-zip reads it from the central directory with caps
enforced while reading, never extracting to disk.(allowed-entry? p)Root .csv worksheet files, manifest.json, signatures.json and the tests tree.
Root .csv worksheet files, manifest.json, signatures.json and the tests tree.
(name-errors names)Errors for entry names alone: traversal, absolute paths, bad characters, reserved names, duplicates and case collisions.
Errors for entry names alone: traversal, absolute paths, bad characters, reserved names, duplicates and case collisions.
(read-zip path)(read-zip path {:keys [max-entries max-entry-bytes max-total-bytes max-ratio]})Reads a PSOSF archive from a file path. Returns {:entries {path text} :errors [...]}. Entries are read from the central directory into memory only; caps on count, size, total size and compression ratio are enforced while reading.
Reads a PSOSF archive from a file path. Returns {:entries {path text}
:errors [...]}. Entries are read from the central directory into memory
only; caps on count, size, total size and compression ratio are enforced
while reading.(write-zip path entries)Writes an entries map {path text} to a ZIP file, in path order.
Writes an entries map {path text} to a ZIP file, in path order.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |