示例#1
0
def dump_uvarint(value: int) -> bytearray:
    writer = BufferWriter(bytearray(16))
    protobuf.dump_uvarint(writer, value)
    return memoryview(writer.buffer)[:writer.offset]
示例#2
0
def dump_uvarint(value: int) -> bytearray:
    writer = ByteArrayWriter()
    await_result(protobuf.dump_uvarint(writer, value))
    return writer.buf
示例#3
0
def dump_uvarint(value: int) -> bytearray:
    w = bytearray()
    protobuf.dump_uvarint(w.extend, value)
    return w
示例#4
0
def write_variant32(w: Writer, value: int) -> None:
    dump_uvarint(w.extend, value)
示例#5
0
def dump_uvarint(value: int) -> bytearray:
    writer = ByteArrayWriter()
    run_until_complete(protobuf.dump_uvarint(writer, value))
    return writer.buf