Constants

HASH_ALGORITHM

HASH_ALGORITHM = 'crc32b'

BIT_ZERO_HEADER

BIT_ZERO_HEADER = 0x8

BIT_EFS_UTF8

BIT_EFS_UTF8 = 0x800

COMPUTE

COMPUTE = 1

SEND

SEND = 2

CHUNKED_READ_BLOCK_SIZE

CHUNKED_READ_BLOCK_SIZE = 1048576

Properties

$name

$name : string

Type

string

$opt

$opt : \ZipStream\Option\File

Type

File

$len

$len : \ZipStream\Bigint

Type

Bigint

$zlen

$zlen : \ZipStream\Bigint

Type

Bigint

$crc

$crc : int

Type

int

$hlen

$hlen : \ZipStream\Bigint

Type

Bigint

$ofs

$ofs : \ZipStream\Bigint

Type

Bigint

$bits

$bits : int

Type

int

$version

$version : \ZipStream\Option\Version

Type

Version

$zip

$zip : \ZipStream\ZipStream

Type

ZipStream

$deflate

$deflate : resource

Type

resource

$hash

$hash : resource

Type

resource

$method

$method : \ZipStream\Option\Method

Type

Method

$totalLength

$totalLength : \ZipStream\Bigint

Type

Bigint

Methods

__construct()

__construct(\ZipStream\ZipStream  $zip, string  $name, ?\ZipStream\Option\File  $opt = null) : mixed

Parameters

\ZipStream\ZipStream $zip
string $name
?\ZipStream\Option\File $opt

Returns

mixed —

processPath()

processPath(string  $path) : void

Parameters

string $path

processData()

processData(string  $data) : void

Parameters

string $data

addFileHeader()

addFileHeader() : void

Create and send zip header for this file.

Throws

\ZipStream\Exception\EncodingException

filterFilename()

filterFilename(string  $filename) : string

Strip characters that are not legal in Windows filenames to prevent compatibility issues

Parameters

string $filename

Unprocessed filename

Returns

string —

addFileFooter()

addFileFooter() : void

Create and send data descriptor footer for this file.

processStream()

processStream(\Psr\Http\Message\StreamInterface  $stream) : void

Parameters

\Psr\Http\Message\StreamInterface $stream

getCdrFile()

getCdrFile() : string

Send CDR record for specified file.

Returns

string —

getTotalLength()

getTotalLength() : \ZipStream\Bigint

Returns

\ZipStream\Bigint —

dosTime()

dosTime(int  $when) : int

Convert a UNIX timestamp to a DOS timestamp.

Parameters

int $when

Returns

int —

DOS Timestamp

buildZip64ExtraBlock()

buildZip64ExtraBlock(bool  $force = false) : string

Parameters

bool $force

Returns

string —

processStreamWithZeroHeader()

processStreamWithZeroHeader(\Psr\Http\Message\StreamInterface  $stream) : void

Parameters

\Psr\Http\Message\StreamInterface $stream

readStream()

readStream(\Psr\Http\Message\StreamInterface  $stream, ?int  $options = null) : void

Parameters

\Psr\Http\Message\StreamInterface $stream
?int $options

deflateInit()

deflateInit() : void

deflateData()

deflateData(\Psr\Http\Message\StreamInterface  $stream, string  $data, ?int  $options = null) : void

Parameters

\Psr\Http\Message\StreamInterface $stream
string $data
?int $options

deflateFinish()

deflateFinish(?int  $options = null) : void

Parameters

?int $options

processStreamWithComputedHeader()

processStreamWithComputedHeader(\Psr\Http\Message\StreamInterface  $stream) : void

Parameters

\Psr\Http\Message\StreamInterface $stream