def compress(data, method, *args, **kwds):
    if (method == ''):
        return data
    _check_method(method)
    if method.startswith('blosc-'):
        kwds['cname'] = method[6:]
        data = blosc.compress(data, *args, **kwds)
    else:
        raise ValueError(("Unknown compression method '%s'" % method))
    return data
def compress(data, method, *args, **kwds):
    if (method == ):
        return data
    _check_method(method)
    if method.startswith('blosc-'):
        kwds['cname'] = method[6:]
        data = blosc.compress(data, *args, **kwds)
    else:
        raise ValueError(("Unknown compression method '%s'" % method))
    return data