Total Complexity | 4 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class BitStreamReader |
||
9 | { |
||
10 | private $dataArray = null; |
||
11 | private $cursor = 0; |
||
12 | |||
13 | /** |
||
14 | * To initialize, provide string data containing the bits. |
||
15 | */ |
||
16 | public function __construct($data) |
||
17 | { |
||
18 | $this->dataArray = BitArray::load($data); |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * read one bit at a time from the buffer, returning null for EOF. |
||
23 | */ |
||
24 | public function readBit() |
||
33 | } |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * whether we've reached the end of our data. |
||
38 | */ |
||
39 | public function isEOF() |
||
42 | } |
||
43 | } |
||
44 |