Files
ICEcoder/LZCompressor/LZReverseDictionary.php
Matt Pass c6e72fd894 LS String PHP lib added
To compress and decompress strings with LZ compression
2016-03-16 18:30:21 +00:00

33 lines
519 B
PHP

<?php
/**
* Created by PhpStorm.
* User: sics
* Date: 28.02.2016
* Time: 12:53
*/
namespace LZCompressor;
class LZReverseDictionary
{
public $entries = [0, 1 ,2];
public function size() {
return count($this->entries);
}
public function hasEntry($index) {
return array_key_exists($index, $this->entries);
}
public function getEntry($index) {
return $this->entries[$index];
}
public function addEntry($char) {
$this->entries[] = $char;
}
}