:suspect:

This commit is contained in:
smiley
2015-12-02 03:49:21 +01:00
parent b8606b24da
commit 20649ec13a
11 changed files with 362 additions and 224 deletions
+10 -1
View File
@@ -26,6 +26,14 @@ class BitBuffer{
*/
protected $length = 0;
/**
*
*/
public function reset(){
$this->buffer = [];
$this->length = 0;
}
/**
* @return array
*/
@@ -46,7 +54,8 @@ class BitBuffer{
public function __toString(){
$buffer = '';
for($i = 0; $i < $this->getLengthInBits(); $i++){
$count = $this->getLengthInBits();
for($i = 0; $i < $count; $i++){
$buffer .= $this->get($i) ? '1' : '0';
}