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