mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 15:24:00 +01:00
33 lines
519 B
PHP
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;
|
|
}
|
|
|
|
} |