:octocat: added BitBuffer::rewind()

This commit is contained in:
smiley
2023-01-31 18:54:33 +01:00
parent 3a2d7eda2c
commit 3ded3d45a6
+10 -2
View File
@@ -159,8 +159,16 @@ final class BitBuffer{
* Clears the buffer and resets the stats
*/
public function clear():self{
$this->buffer = [];
$this->length = 0;
$this->buffer = [];
$this->length = 0;
return $this->rewind();
}
/**
* Resets the read-counters
*/
public function rewind():self{
$this->bytesRead = 0;
$this->bitsRead = 0;