Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1e13a89
Add code from python-isal project
rhpvorderman Sep 28, 2022
6a5cdfd
Reorder code
rhpvorderman Sep 28, 2022
809ad5f
Add ZlibDecompressor
rhpvorderman Sep 28, 2022
03254b8
Add zlibdecompressor object
rhpvorderman Sep 28, 2022
669848a
Fix compile warnings
rhpvorderman Sep 28, 2022
69ff613
Do not use class input
rhpvorderman Sep 28, 2022
6fa43ae
Fix lock stuff
rhpvorderman Sep 28, 2022
cdc5972
Fix incorrect error handling
rhpvorderman Sep 28, 2022
7820627
Rework _GzipReader to be more efficient
rhpvorderman Sep 28, 2022
6f8b64a
Properly initialize zstate
rhpvorderman Sep 30, 2022
3e2a4f5
Add blurb for increased gzip read speed
rhpvorderman Sep 30, 2022
070df1c
Make sure self->initialised is set to 0. Reword some comments.
rhpvorderman Sep 30, 2022
70b7d4d
Add appropriate doctype in blurb
rhpvorderman Sep 30, 2022
22d3893
Merge branch 'main' into gh-95534
rhpvorderman Sep 30, 2022
18a7692
Add missing NULL member to ZlibDecompressor_Members
rhpvorderman Sep 30, 2022
d54c8b5
Merge branch 'gh-95534' of github.com:rhpvorderman/cpython into gh-95534
rhpvorderman Sep 30, 2022
c90096f
Remove double comment
rhpvorderman Sep 30, 2022
1c15839
Use READ_BUFFER_SIZE in python -m gzip command line application
rhpvorderman Sep 30, 2022
d0ff4f0
Fix error in news entry
rhpvorderman Sep 30, 2022
afd92ab
minor edit, use +=
gpshead Sep 30, 2022
922ac5c
Throw compile warning on zlib versions that are too old
rhpvorderman Oct 2, 2022
dc7de61
Use bool instead of int
rhpvorderman Oct 2, 2022
ca12c1f
Correct spelling of insufficient
rhpvorderman Oct 2, 2022
1ce342b
Put brackets around if statement
rhpvorderman Oct 2, 2022
0b7735e
Remove strange default case
rhpvorderman Oct 2, 2022
043a376
Remove unnecessary zero op
rhpvorderman Oct 2, 2022
2a653a9
Change RetVal to return_value
rhpvorderman Oct 2, 2022
475aef6
Change char to bool
rhpvorderman Oct 2, 2022
41ba076
Properly bracketify if-else clause
rhpvorderman Oct 2, 2022
5f1901d
Prefix underscore to _ZlibDecompressor name
rhpvorderman Oct 2, 2022
c5d6888
Copy explanation about zdict from python docs into function docstring
rhpvorderman Oct 2, 2022
9d60339
Merge branch 'gh-95534' of github.com:rhpvorderman/cpython into gh-95534
rhpvorderman Oct 2, 2022
e3da415
Add tests for _ZlibDecompressor
rhpvorderman Oct 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not use class input
  • Loading branch information
rhpvorderman committed Sep 28, 2022
commit 69ff613e6036fe43e0882992da66179b0f7ca21e
13 changes: 6 additions & 7 deletions Modules/clinic/zlibmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions Modules/zlibmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,7 @@ decompress_buf(ZlibDecompressor *self, Py_ssize_t max_length)


static PyObject *
decompress(ZlibDecompressor *self, PyTypeObject *cls, uint8_t *data,
decompress(ZlibDecompressor *self, uint8_t *data,
size_t len, Py_ssize_t max_length)
{
char input_buffer_in_use;
Comment thread
rhpvorderman marked this conversation as resolved.
Outdated
Expand Down Expand Up @@ -1685,7 +1685,6 @@ decompress(ZlibDecompressor *self, PyTypeObject *cls, uint8_t *data,
/*[clinic input]
zlib.ZlibDecompressor.decompress

cls: defining_class
data: Py_buffer
max_length: Py_ssize_t=-1

Expand All @@ -1707,9 +1706,8 @@ the unused_data attribute.

static PyObject *
zlib_ZlibDecompressor_decompress_impl(ZlibDecompressor *self,
PyTypeObject *cls, Py_buffer *data,
Py_ssize_t max_length)
/*[clinic end generated code: output=62a74845fde185c1 input=e16759033492a273]*/
Py_buffer *data, Py_ssize_t max_length)
/*[clinic end generated code: output=990d32787b775f85 input=0b29d99715250b96]*/

{
PyObject *result = NULL;
Expand All @@ -1718,7 +1716,7 @@ zlib_ZlibDecompressor_decompress_impl(ZlibDecompressor *self,
if (self->eof)
Comment thread
rhpvorderman marked this conversation as resolved.
Outdated
PyErr_SetString(PyExc_EOFError, "End of stream already reached");
else
result = decompress(self, cls, data->buf, data->len, max_length);
result = decompress(self, data->buf, data->len, max_length);
LEAVE_ZLIB(self);
return result;
}
Expand Down