Korin API

ReadOptions
in package

Read onlyYes
FinalYes

Table of Contents

Properties

$dialects  : bool
$encoding  : Encoding|null
$maxArchiveSize  : int
$maxCompressionRatio  : int
$maxDepth  : int
$maxLineLength  : int
$strict  : bool
$version  : Version|null

Methods

__construct()  : mixed
withArchiveLimits()  : self
GEDZIP limits against zip bombs: total uncompressed size, and compression ratio of an entry over 1 MiB.
withDialects()  : self
Whether documented mistakes of programs are corrected (KV1010; docs/dialects.md): on by default.
withEncoding()  : self
withLimits()  : self
withStrict()  : self
withVersion()  : self

Properties

$maxArchiveSize

public int $maxArchiveSize = 4294967296

$maxCompressionRatio

public int $maxCompressionRatio = 100

Methods

__construct()

public __construct([bool $strict = false ][, Encoding|null $encoding = null ][, Version|null $version = null ][, int $maxDepth = 100 ][, int $maxLineLength = 1048576 ][, int $maxArchiveSize = 4294967296 ][, int $maxCompressionRatio = 100 ][, bool $dialects = true ]) : mixed
Parameters
$strict : bool = false
$encoding : Encoding|null = null
$version : Version|null = null
$maxDepth : int = 100
$maxLineLength : int = 1048576
$maxArchiveSize : int = 4294967296

GEDZIP: the most bytes the entries of an archive may hold, uncompressed

$maxCompressionRatio : int = 100

GEDZIP: the most an entry of more than 1 MiB may be compressed (a zip bomb is compressed by thousands)

$dialects : bool = true

withArchiveLimits()

GEDZIP limits against zip bombs: total uncompressed size, and compression ratio of an entry over 1 MiB.

public withArchiveLimits(int $maxArchiveSize, int $maxCompressionRatio) : self
Parameters
$maxArchiveSize : int
$maxCompressionRatio : int
Return values
self

withDialects()

Whether documented mistakes of programs are corrected (KV1010; docs/dialects.md): on by default.

public withDialects([bool $dialects = true ]) : self
Parameters
$dialects : bool = true
Return values
self

withLimits()

public withLimits(int $maxDepth, int $maxLineLength) : self
Parameters
$maxDepth : int
$maxLineLength : int
Return values
self

withStrict()

public withStrict([bool $strict = true ]) : self
Parameters
$strict : bool = true
Return values
self
On this page

Search results