Package-level declarations

Types

Link copied to clipboard
data class ArchiveLimits(val maxUncompressedBytes: Long = 2L * 1024 * 1024 * 1024, val maxCompressionRatio: Int, val maxEntries: Int, val maxNestingDepth: Int = 8)

Decompression-bomb defences, applied during decode (never trust a declared size for allocation). Passed into every decompress/read call; the defaults are deliberately safe so a caller cannot forget them.

Link copied to clipboard

Thrown when an archive entry name fails the PathGuard checks.

Link copied to clipboard

Thrown when input trips a decompression-bomb guard.

Link copied to clipboard
object PathGuard

Zip-Slip / path-traversal defence (Snyk 2018; CVE-2020-8913; CVE-2023-35947; Android "Zip Path Traversal"). Every entry name read out of an archive MUST pass through sanitize before it is joined to an output directory.