@@ -22,7 +22,10 @@ def get_serialize_desc(compression=lib.GxB_COMPRESSION_DEFAULT, level=None, nthr
22
22
if nthreads is not None :
23
23
check_status (desc , lib .GxB_Desc_set (desc [0 ], lib .GxB_NTHREADS , ffi .cast ("int" , nthreads )))
24
24
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
+ }:
26
29
compression += level
27
30
check_status (
28
31
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, *,
37
40
----------
38
41
compression : int, optional
39
42
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
41
44
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
+
43
48
nthreads : int, optional
44
49
The maximum number of OpenMP threads to use.
45
50
"""
@@ -59,9 +64,10 @@ def serialize_vector(v, compression=lib.GxB_COMPRESSION_DEFAULT, level=None, *,
59
64
----------
60
65
compression : int, optional
61
66
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
63
68
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.
65
71
nthreads : int, optional
66
72
The maximum number of OpenMP threads to use.
67
73
"""
0 commit comments