@@ -109,7 +109,8 @@ static const int ZLIB_MEM_LEVEL_TO_ISAL[10] = {
109
109
MEM_LEVEL_MEDIUM , // 4-6 -> MEDIUM
110
110
MEM_LEVEL_MEDIUM ,
111
111
MEM_LEVEL_MEDIUM ,
112
- MEM_LEVEL_LARGE , // 7-8 LARGE. The zlib module default = 8. Large is the ISA-L default value.
112
+ // 7-8 LARGE. The zlib module default = 8. Large is the ISA-L default value.
113
+ MEM_LEVEL_LARGE ,
113
114
MEM_LEVEL_LARGE ,
114
115
MEM_LEVEL_EXTRA_LARGE , // 9 -> EXTRA_LARGE.
115
116
};
@@ -435,7 +436,8 @@ isal_zlib_compressobj_impl(PyObject *module, int level, int method, int wbits,
435
436
if (strategy != Z_DEFAULT_STRATEGY ){
436
437
err = PyErr_WarnEx (
437
438
PyExc_UserWarning ,
438
- "Only one strategy is supported when using isal_zlib. Using the default strategy." ,
439
+ "Only one strategy is supported when using isal_zlib. Using the "
440
+ "default strategy." ,
439
441
1 );
440
442
if (err == -1 )
441
443
// Warning was turned into an exception.
@@ -456,7 +458,8 @@ isal_zlib_compressobj_impl(PyObject *module, int level, int method, int wbits,
456
458
if (mem_level_to_bufsize (
457
459
level , isal_mem_level , & level_buf_size ) == -1 ) {
458
460
PyErr_Format (PyExc_ValueError ,
459
- "Invalid compression level: %d. Compression level should be between 0 and 3" ,
461
+ "Invalid compression level: %d. Compression level should "
462
+ "be between 0 and 3" ,
460
463
level );
461
464
goto error ;
462
465
}
@@ -690,7 +693,8 @@ isal_zlib_Decompress_decompress_impl(decompobject *self, Py_buffer *data,
690
693
goto abort ;
691
694
}
692
695
693
- } while (self -> zst .avail_out == 0 && self -> zst .block_state != ISAL_BLOCK_FINISH );
696
+ } while (self -> zst .avail_out == 0 &&
697
+ self -> zst .block_state != ISAL_BLOCK_FINISH );
694
698
695
699
} while (self -> zst .block_state != ISAL_BLOCK_FINISH && ibuflen != 0 );
696
700
@@ -802,7 +806,8 @@ isal_zlib_Decompress_flush_impl(decompobject *self, Py_ssize_t length)
802
806
803
807
do {
804
808
length = arrange_output_buffer (& (self -> zst .avail_out ),
805
- & (self -> zst .next_out ), & RetVal , length );
809
+ & (self -> zst .next_out ),
810
+ & RetVal , length );
806
811
if (length < 0 )
807
812
goto abort ;
808
813
@@ -813,7 +818,8 @@ isal_zlib_Decompress_flush_impl(decompobject *self, Py_ssize_t length)
813
818
goto abort ;
814
819
}
815
820
816
- } while (self -> zst .avail_out == 0 && self -> zst .block_state != ISAL_BLOCK_FINISH );
821
+ } while (self -> zst .avail_out == 0 &&
822
+ self -> zst .block_state != ISAL_BLOCK_FINISH );
817
823
818
824
} while (self -> zst .block_state != ISAL_BLOCK_FINISH && ibuflen != 0 );
819
825
@@ -868,13 +874,15 @@ PyDoc_STRVAR(isal_zlib_compressobj__doc__,
868
874
" containing subsequences that are likely to occur in the input data." );
869
875
870
876
#define ISAL_ZLIB_COMPRESSOBJ_METHODDEF \
871
- {"compressobj", (PyCFunction)(void(*)(void))isal_zlib_compressobj, METH_VARARGS|METH_KEYWORDS, isal_zlib_compressobj__doc__}
877
+ {"compressobj", (PyCFunction)(void(*)(void))isal_zlib_compressobj, \
878
+ METH_VARARGS|METH_KEYWORDS, isal_zlib_compressobj__doc__}
872
879
873
880
static PyObject *
874
881
isal_zlib_compressobj (PyObject * module , PyObject * args , PyObject * kwargs )
875
882
{
876
883
PyObject * return_value = NULL ;
877
- static char * keywords [] = {"level" , "method" , "wbits" , "memLevel" , "strategy" , "zdict" , NULL };
884
+ static char * keywords [] = {"level" , "method" , "wbits" , "memLevel" ,
885
+ "strategy" , "zdict" , NULL };
878
886
static char * format = "|iiiiiy*:compressobj" ;
879
887
int level = ISAL_DEFAULT_COMPRESSION ;
880
888
int method = Z_DEFLATED ;
@@ -888,7 +896,8 @@ isal_zlib_compressobj(PyObject *module, PyObject *args, PyObject *kwargs)
888
896
& level , & method , & wbits , & memLevel , & strategy , & zdict )) {
889
897
return NULL ;
890
898
}
891
- return_value = isal_zlib_compressobj_impl (module , level , method , wbits , memLevel , strategy , & zdict );
899
+ return_value = isal_zlib_compressobj_impl (module , level , method , wbits ,
900
+ memLevel , strategy , & zdict );
892
901
PyBuffer_Release (& zdict );
893
902
return return_value ;
894
903
}
@@ -906,7 +915,8 @@ PyDoc_STRVAR(isal_zlib_decompressobj__doc__,
906
915
" dictionary as used by the compressor that produced the input data." );
907
916
908
917
#define ISAL_ZLIB_DECOMPRESSOBJ_METHODDEF \
909
- {"decompressobj", (PyCFunction)(void(*)(void))isal_zlib_decompressobj, METH_VARARGS|METH_KEYWORDS, isal_zlib_decompressobj__doc__}
918
+ {"decompressobj", (PyCFunction)(void(*)(void))isal_zlib_decompressobj, \
919
+ METH_VARARGS|METH_KEYWORDS, isal_zlib_decompressobj__doc__}
910
920
911
921
static PyObject *
912
922
isal_zlib_decompressobj (PyObject * module , PyObject * args , PyObject * kwargs )
@@ -938,7 +948,8 @@ PyDoc_STRVAR(isal_zlib_Compress_compress__doc__,
938
948
"Call the flush() method to clear these buffers." );
939
949
940
950
#define ISAL_ZLIB_COMPRESS_COMPRESS_METHODDEF \
941
- {"compress", (PyCFunction)(void(*)(void))isal_zlib_Compress_compress, METH_O, isal_zlib_Compress_compress__doc__}
951
+ {"compress", (PyCFunction)(void(*)(void))isal_zlib_Compress_compress, \
952
+ METH_O, isal_zlib_Compress_compress__doc__}
942
953
943
954
944
955
static PyObject *
@@ -971,7 +982,8 @@ PyDoc_STRVAR(isal_zlib_Decompress_decompress__doc__,
971
982
"Call the flush() method to clear these buffers." );
972
983
973
984
#define ISAL_ZLIB_DECOMPRESS_DECOMPRESS_METHODDEF \
974
- {"decompress", (PyCFunction)(void(*)(void))isal_zlib_Decompress_decompress, METH_VARARGS|METH_KEYWORDS, isal_zlib_Decompress_decompress__doc__}
985
+ {"decompress", (PyCFunction)(void(*)(void))isal_zlib_Decompress_decompress, \
986
+ METH_VARARGS|METH_KEYWORDS, isal_zlib_Decompress_decompress__doc__}
975
987
976
988
977
989
static PyObject *
@@ -986,7 +998,8 @@ isal_zlib_Decompress_decompress(decompobject *self, PyObject *args, PyObject *kw
986
998
args , kwargs , format , keywords , & data , & max_length )) {
987
999
return NULL ;
988
1000
}
989
- PyObject * return_value = isal_zlib_Decompress_decompress_impl (self , & data , max_length );
1001
+ PyObject * return_value = isal_zlib_Decompress_decompress_impl (self , & data ,
1002
+ max_length );
990
1003
PyBuffer_Release (& data );
991
1004
return return_value ;
992
1005
}
@@ -1004,11 +1017,15 @@ PyDoc_STRVAR(isal_zlib_Compress_flush__doc__,
1004
1017
" can still be compressed." );
1005
1018
1006
1019
#define ISAL_ZLIB_COMPRESS_FLUSH_METHODDEF \
1007
- {"flush", (PyCFunction)(void(*)(void))isal_zlib_Compress_flush, METH_FASTCALL|METH_KEYWORDS, isal_zlib_Compress_flush__doc__}
1020
+ {"flush", (PyCFunction)(void(*)(void))isal_zlib_Compress_flush, \
1021
+ METH_FASTCALL|METH_KEYWORDS, isal_zlib_Compress_flush__doc__}
1008
1022
1009
1023
1010
1024
static PyObject *
1011
- isal_zlib_Compress_flush (compobject * self , PyObject * const * args , Py_ssize_t nargs , PyObject * kwnames )
1025
+ isal_zlib_Compress_flush (compobject * self ,
1026
+ PyObject * const * args ,
1027
+ Py_ssize_t nargs ,
1028
+ PyObject * kwnames )
1012
1029
{
1013
1030
Py_ssize_t mode ;
1014
1031
if (nargs == 0 ) {
@@ -1047,7 +1064,8 @@ PyDoc_STRVAR(isal_zlib_Decompress_flush__doc__,
1047
1064
1048
1065
1049
1066
#define ISAL_ZLIB_DECOMPRESS_FLUSH_METHODDEF \
1050
- {"flush", (PyCFunction)(void(*)(void))isal_zlib_Decompress_flush, METH_FASTCALL, isal_zlib_Decompress_flush__doc__}
1067
+ {"flush", (PyCFunction)(void(*)(void))isal_zlib_Decompress_flush, \
1068
+ METH_FASTCALL, isal_zlib_Decompress_flush__doc__}
1051
1069
1052
1070
static PyObject *
1053
1071
isal_zlib_Decompress_flush (decompobject * self , PyObject * const * args , Py_ssize_t nargs )
0 commit comments