

def unconvert(values, dtype, compress=None):
    as_is_ext = (isinstance(values, ExtType) and (values.code == 0))
    if as_is_ext:
        values = values.data
    if is_categorical_dtype(dtype):
        return values
    elif is_object_dtype(dtype):
        return np.array(values, dtype=object)
    dtype = pandas_dtype(dtype).base
    if (not as_is_ext):
        values = values.encode('latin1')
    if compress:
        if (compress == 'zlib'):
            _check_zlib()
            decompress = zlib.decompress
        elif (compress == 'blosc'):
            _check_blosc()
            decompress = blosc.decompress
        else:
            raise ValueError("compress must be one of 'zlib' or 'blosc'")
        try:
            return np.frombuffer(_move_into_mutable_buffer(decompress(values)), dtype=dtype)
        except _BadMove as e:
            values = e.args[0]
            if (len(decompress) > 1):
                warnings.warn('copying data after decompressing; this may mean that decompress is caching its result', PerformanceWarning)
    return np.fromstring(values, dtype=dtype)

dataset/ETHPy150Open pydata/pandas/pandas/io/packers.py unconvert/VarMisuse@206/286 `values`->`decompress`