Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def compressor_list():
"""
compressor_list()
Returns a list of compressors available in C library.
Parameters
----------
None
Returns
-------
out : list
The list of names.
"""
return _ext.compressor_list().split(',')
"""
name_to_code(name)
Return the compressor code of a compressor name.
Parameters
----------
name : str
The compressor name.
Returns
-------
out : int
The compressor code.
"""
return _ext.name_to_code(name)
-----
The number of threads for Blosc is the maximum number of cores
detected on your machine (via `detect_number_of_cores`). In some
cases Blosc gets better results if you set the number of threads
to a value slightly below than your number of cores.
Examples
--------
Set the number of threads to 2 and then to 1:
>>> oldn = set_nthreads(2)
>>> set_nthreads(1)
2
"""
if nthreads > _ext.BLOSC_MAX_THREADS:
raise ValueError("the number of threads cannot be larger than %d" % \
_ext.BLOSC_MAX_THREADS)
return _ext.set_nthreads(nthreads)