Flushes the remaining partial uint8, call this at the end of the stream to encode.
(self)
| 79 | self.fo.write(bytes([lower_8bits])) |
| 80 | |
| 81 | def flush(self): |
| 82 | """Flushes the remaining partial uint8, call this at the end |
| 83 | of the stream to encode.""" |
| 84 | if self._current_bits: |
| 85 | self.fo.write(bytes([self._current_value])) |
| 86 | self._current_value = 0 |
| 87 | self._current_bits = 0 |
| 88 | self.fo.flush() |
| 89 | |
| 90 | |
| 91 | class BitUnpacker: |
no outgoing calls
no test coverage detected