def METHOD_NAME(data: bytes) -> bytes:
    """Returns a bytes object of the brieflz-compressed data."""
    fn_blz_pack_level = _fn_blz_pack_level()
    output_buffer_len = blz_max_packed_size(len(data))
    src = data
    dst = ctypes.create_string_buffer(output_buffer_len)
    src_size = len(src)
    workmem = ctypes.create_string_buffer(blz_workmem_size_level(len(data), 10))
    level = 10
    res = fn_blz_pack_level(src, dst, src_size, workmem, level)
    if res == 0:
        raise BriefLZError()
    else:
        return bytes(dst[:res])  # type: ignore