@@ -74,7 +74,7 @@ cdef extern from "blosc.h":
74
74
75
75
76
76
def blosc_version ():
77
- """ Return the version of c- blosc that zarr was compiled with."""
77
+ """ Return the version of blosc that zarr was compiled with."""
78
78
79
79
# all the 'decode' contorsions are for Python 3 returning actual strings
80
80
ver_str = < char * > BLOSC_VERSION_STRING
@@ -97,7 +97,24 @@ def destroy():
97
97
_blosc_use_context = False
98
98
99
99
100
- def set_blosc_options (use_context , nthreads = None ):
100
+ def set_blosc_options (use_context = False , nthreads = None ):
101
+ """ Set options for how the blosc compressor is used.
102
+
103
+ Parameters
104
+ ----------
105
+ use_context : bool, optional
106
+ If False, blosc will be used in non-contextual mode, which is best
107
+ when using zarr in a single-threaded environment because it allows
108
+ blosc to use multiple threads internally. If True, blosc will be used
109
+ in contextual mode, which is better when using zarr in a
110
+ multi-threaded environment like dask.array because it avoids the blosc
111
+ global lock and so multiple blosc operations can be running
112
+ concurrently.
113
+ nthreads : int, optional
114
+ Number of internal threads to use when running blosc in non-contextual
115
+ mode.
116
+
117
+ """
101
118
global _blosc_use_context
102
119
_blosc_use_context = use_context
103
120
if not use_context:
0 commit comments