# Add \`osid\` to gzip module

**URL:** <https://discuss.python.org/t/add-osid-to-gzip-module/109740>\
**Category:** Ideas\
**Created:** [October 29, 2026, 1:43am UTC](https://discuss.python.org/t/add-osid-to-gzip-module/109740 "2026-10-29T01:43:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jepler](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jepler/32/35815_2.png) [@jepler](https://discuss.python.org/u/jepler)\
**Post date:** [October 29, 2026, 1:43am UTC](https://discuss.python.org/t/add-osid-to-gzip-module/109740/1 "2026-10-29T01:43:10Z")

</div>

Maybe it’s YAGNI, but I was noticing that the gzip header contains an “operating system ID” byte. Python learned to consistently set this byte to 255 when writing files (an aid to reproducibility of gzippped). However, there’s not a way to _retrieve_ the value for a file that’s being read (this can occasionally be of interest), or to _set_ it to a value specified in code.

I’ve worked up a branch that implements this: [gzip: Add `osid` · jepler/cpython@32429fb · GitHub](https://github.com/jepler/cpython/commit/32429fb9486d21616c1af88189102cc7c4087cf7) with a test but incomplete documentation as of now.

Thoughts? I’d be happy to create an issue & PR for this, but not if there’s no interest.
