Constant-width integer serialization
    :param reader:
    :param width:
    :return:

async def load_uint(reader, width):
    """
    Constant-width integer serialization
    :param reader:
    :param width:
    :return:
    """
    buffer = _UINT_BUFFER
    result = 0
    shift = 0
    for _ in range(width):
        await reader.areadinto(buffer)
        result += buffer[0] << shift
        shift += 8
    return result