def read(reader: BitStreamReader, _index: int) -> int: """ Reads Zserio varuint type from the bit stream. :param reader: Bit stream from which to read. :param _index: Not used. """ return reader.readVarUInt()
def testReadVarUInt(self): reader = BitStreamReader(bytes(1)) self.assertEqual(0, reader.readVarUInt()) self.assertEqual(8, reader.getBitPosition()) with self.assertRaises(PythonRuntimeException): reader.readVarUInt()