def METHOD_NAME(data: bytes, expected_depack_size: int) -> bytes:
    """Returns a bytes object of the uncompressed data."""
    fn_blz_depack_srcsize = _fn_blz_depack_srcsize()
    output_buffer_len = expected_depack_size * 2
    src = data
    dst = ctypes.create_string_buffer(output_buffer_len)
    src_size = len(src)
    res = fn_blz_depack_srcsize(src, dst, src_size)
    if res == 0:
        raise BriefLZError()
    else:
        return bytes(dst[:res])  # type: ignore