\seekquarry\yioop\library\compressorsNonCompressor

Implementation of a trivial Compressor.

NonCompressor's compress and uncompress filter return the string unchanged

Summary

Methods
Properties
Constants
__construct()
compress()
uncompress()
compressInt()
uncompressInt()
compressedIntLen()
fileExtension()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() 

Constructor does nothing

compress()

compress(string  $str) : string

Applies the Compressor compress filter to a string before it is inserted into a WebArchive. In this case, the filter does nothing.

Parameters

string $str

string to apply filter to

Returns

string —

the result of applying the filter

uncompress()

uncompress(string  $str) : string

Used to unapply the compress filter as when data is read out of a WebArchive. In this case, the unapplying filter does nothing.

Parameters

string $str

data read from a string archive

Returns

string —

result of uncompressing

compressInt()

compressInt(integer  $my_int) : string

Used to compress an int as a fixed length string in the format of the compression algorithm underlying the compressor. Since this compressor doesn't compress we just use pack

Parameters

integer $my_int

the integer to compress as a fixed length string

Returns

string —

the fixed length string containing the packed int

uncompressInt()

uncompressInt(string  $my_compressed_int) : integer

Used to uncompress an int from a fixed length string in the format of the compression algorithm underlying the compressor. Since this compressor doesn't compress we just use unpack

Parameters

string $my_compressed_int

the fixed length string containing the packed int to extract

Returns

integer —

the integer contained in that string

compressedIntLen()

compressedIntLen() : integer

Computes the length of an int when packed using the underlying compression algorithm as a fixed length string. The pack function stores ints as 4 byte strings

Returns

integer —

length of int as a fixed length compressed string

fileExtension()

fileExtension() : string

File extension that should be associated with this compressor

Returns

string —

name of dos file extension