You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
zlib.compressobj level default value documentation #70432
I’m not sure that is perfectly correct. It really does default to -1, and that is passed to the underlying zlib library (-1 = Z_DEFAULT_COMPRESSION). It is the zlib library that decides that this means 6, but in theory I guess it could be configured or modified in the future with a different default. Perhaps we should clarify the text in the documentation (including the doc string) to say this instead?
At the very least, the documentation should continue to say that -1 is acceptable, and what it means.
palaviv commented on Jan 31, 2016
palavivmannequin
MannequinAuthor
More actions
I think that we can leave the level=-1 as the default in the documentation. What should be added is what Z_DEFAULT_COMPRESSION means.
I tried to be as close as possible to the zlib module documentation.
Activity
palaviv commentedon Jan 30, 2016
In the zlib.compressobj documentation the default value of the compress level is -1 while it is actually 6.
patch is included
vadmium commentedon Jan 30, 2016
I’m not sure that is perfectly correct. It really does default to -1, and that is passed to the underlying zlib library (-1 = Z_DEFAULT_COMPRESSION). It is the zlib library that decides that this means 6, but in theory I guess it could be configured or modified in the future with a different default. Perhaps we should clarify the text in the documentation (including the doc string) to say this instead?
At the very least, the documentation should continue to say that -1 is acceptable, and what it means.
palaviv commentedon Jan 31, 2016
I think that we can leave the level=-1 as the default in the documentation. What should be added is what Z_DEFAULT_COMPRESSION means.
I tried to be as close as possible to the zlib module documentation.
vadmium commentedon Jan 31, 2016
This version looks great to me.
python-dev commentedon Feb 2, 2016
New changeset 650cf38fba28 by Martin Panter in branch '2.7':
Issue bpo-26244: Clarify default zlib compression level in documentation
https://hg.python.org/cpython/rev/650cf38fba28
New changeset 950e0bfe94ae by Martin Panter in branch '3.5':
Issue bpo-26244: Clarify default zlib compression level in documentation
https://hg.python.org/cpython/rev/950e0bfe94ae
New changeset 03708c680eca by Martin Panter in branch 'default':
Issue bpo-26244: Merge zlib documentation from 3.5
https://hg.python.org/cpython/rev/03708c680eca
vadmium commentedon Feb 2, 2016
I also made a small change to the compressobj() doc string.