def is_unpackable(self, bytes, offset): head, offset2 = base128variant.unpack(bytes, offset) if ((head >> 3) == self.index): if ((head & 7) == self.get_wire_type()): return offset2 return None
def unpack_stream(cls, bytes, offset): value_len, offset = base128variant.unpack(bytes, offset) value = bytes[offset:offset + value_len] offset += value_len return value, offset
def unpack(self, bytes, offset): value_len, offset = base128variant.unpack(bytes, offset) for index in range(value_len): value, offset = self.value_type.unpack_stream(bytes, offset) self.values.append(value) return self, offset
def unpack_stream(cls, bytes, offset): ret, offset = base128variant.unpack(bytes, offset) return ret, offset
def unpack_stream(cls, bytes, offset): ret, offset = base128variant.unpack(bytes, offset) return zigzag.decode(ret), offset