@@ -22,7 +22,10 @@ def get_serialize_desc(compression=lib.GxB_COMPRESSION_DEFAULT, level=None, nthr
2222 if nthreads is not None :
2323 check_status (desc , lib .GxB_Desc_set (desc [0 ], lib .GxB_NTHREADS , ffi .cast ("int" , nthreads )))
2424 if compression is not None :
25- if level is not None and compression == lib .GxB_COMPRESSION_LZ4HC :
25+ if level is not None and compression in {
26+ lib .GxB_COMPRESSION_LZ4HC ,
27+ lib .GxB_COMPRESSION_ZSTD ,
28+ }:
2629 compression += level
2730 check_status (
2831 desc , lib .GxB_Desc_set (desc [0 ], lib .GxB_COMPRESSION , ffi .cast ("int" , compression ))
@@ -37,9 +40,11 @@ def serialize_matrix(A, compression=lib.GxB_COMPRESSION_DEFAULT, level=None, *,
3740 ----------
3841 compression : int, optional
3942 One of None, GxB_COMPRESSION_NONE, GxB_COMPRESSION_DEFAULT,
40- GxB_COMPRESSION_LZ4, or GxB_COMPRESSION_LZ4HC
43+ GxB_COMPRESSION_LZ4, GxB_COMPRESSION_LZ4HC, or GxB_COMPRESSION_ZSTD
4144 level : int, optional
42- Used by GxB_COMPRESSION_LZ4HC. Should be between 1 and 9, where 9 is most compressed.
45+ For GxB_COMPRESSION_LZ4HC, should be between 1 and 9, where 9 is most compressed.
46+ For GxB_COMPRESSION_ZSTD, should be between 1 and 19, where 19 is most compressed.
47+
4348 nthreads : int, optional
4449 The maximum number of OpenMP threads to use.
4550 """
@@ -59,9 +64,10 @@ def serialize_vector(v, compression=lib.GxB_COMPRESSION_DEFAULT, level=None, *,
5964 ----------
6065 compression : int, optional
6166 One of None, GxB_COMPRESSION_NONE, GxB_COMPRESSION_DEFAULT,
62- GxB_COMPRESSION_LZ4, or GxB_COMPRESSION_LZ4HC
67+ GxB_COMPRESSION_LZ4, GxB_COMPRESSION_LZ4HC, or GxB_COMPRESSION_ZSTD
6368 level : int, optional
64- Used by GxB_COMPRESSION_LZ4HC. Should be between 1 and 9, where 9 is most compressed.
69+ For GxB_COMPRESSION_LZ4HC, should be between 1 and 9, where 9 is most compressed.
70+ For GxB_COMPRESSION_ZSTD, should be between 1 and 19, where 19 is most compressed.
6571 nthreads : int, optional
6672 The maximum number of OpenMP threads to use.
6773 """
0 commit comments