def METHOD_NAME(compressed_array, compression_mask, out=None, default=None):
    if out is None:
        ret = np.empty(len(compression_mask))
        ret.fill(np.nan)
    else:
        ret = out
    ret[compression_mask] = compressed_array
    if default is not None:
        ret[~compression_mask] = default
    return ret