add encrption module

fix bug in zstd compression warp code
fix bug when showing compression inforamtion
This commit is contained in:
2022-01-27 16:30:25 +08:00
parent ccb61741ee
commit cc123daaa0
6 changed files with 558 additions and 5 deletions

View File

@@ -174,7 +174,7 @@ cdef class ZSTDDecompressor:
if self.finish and i.pos < i.size:
obuf = (<char*> i.src) + i.pos
self._unused_data = PyBytes_FromStringAndSize(obuf, i.size - i.pos)
if max_length == 1 or len(b) <= max_length:
if max_length == -1 or len(b) <= max_length:
return b
else:
self._buff = b[max_length:]