From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "enum" |
|---|
| subject | "Format:Gzip" |
|---|
| claim | "Header byte 9 of a gzip member names the writer's OS: RFC 1952 defines 0 FAT, 1 Amiga, 2 VMS, 3 Unix, 4 VM/CMS, 5 Atari TOS, 6 HPFS, 7 Macintosh, 8 Z-System, 9 CP/M, 10 TOPS-20, 11 NTFS, 12 QDOS, 13 Acorn RISCOS, 255 unknown. zlib writes its compile-time OS_CODE instead: 10 for Win32/Win64 (not 11), 3 for Unix and Cygwin, 19 for Apple, 0 for MS-DOS/Win16, 6 for OS/2, 16 BeOS, 18 OS/400; Python's gzip module writes 255." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Gzip" |
|---|
| observed_in | | "Python 3.11 zlib 1.3.2 on Windows writes 0x0A" |
| "Python 3.11 gzip module writes 0xFF" |
|
|---|
|
|---|
| data | | name | "gzip_os" |
|---|
| underlying_type | "uint8_t" |
|---|
| values | | 0 | "GZ_OS_FAT" |
|---|
| 1 | "GZ_OS_AMIGA" |
|---|
| 2 | "GZ_OS_VMS" |
|---|
| 3 | "GZ_OS_UNIX" |
|---|
| 4 | "GZ_OS_VM_CMS" |
|---|
| 5 | "GZ_OS_ATARI" |
|---|
| 6 | "GZ_OS_HPFS" |
|---|
| 7 | "GZ_OS_MACINTOSH" |
|---|
| 8 | "GZ_OS_Z_SYSTEM" |
|---|
| 9 | "GZ_OS_CPM" |
|---|
| 10 | "GZ_OS_TOPS20_OR_ZLIB_WIN32" |
|---|
| 11 | "GZ_OS_NTFS" |
|---|
| 12 | "GZ_OS_QDOS" |
|---|
| 13 | "GZ_OS_RISCOS" |
|---|
| 16 | "GZ_OS_ZLIB_BEOS" |
|---|
| 18 | "GZ_OS_ZLIB_OS400" |
|---|
| 19 | "GZ_OS_ZLIB_APPLE" |
|---|
| 255 | "GZ_OS_UNKNOWN" |
|---|
|
|---|
| complete | true |
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "RFC 1952 section 2.3.1 (OS values 0-13, 255)" |
|---|
|
| type | "source" |
|---|
| detail | "OS_CODE 0x00 MSDOS/WINDOWS-not-WIN32, 1 AMIGA, 2 VMS, 4/11/8 __370__, 5 ATARI, 6 OS2, 7 MACOS, 13 riscos, 10 WIN32 && !__CYGWIN__, 16 _BEOS_, 18 __TOS_OS400__, 19 __APPLE__, default 3" |
|---|
| repo | "https://github.com/madler/zlib" |
|---|
| commit | "767c4c947852e143f582c85f14cf573411df1b35" |
|---|
| path | "zutil.h" |
|---|
| lines | "99-188" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "compressobj(wbits=31) output byte 9 = 0x0A on Windows; gzip.GzipFile output byte 9 = 0xFF." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "gzip OS byte" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T05:49:45.126Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:22:40.150Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read OS_CODE defines in zutil.h at the commit (0,1,2,4/11/8,5,6,7,13,10,16,18,19, default 3) against the data; RFC 1952 values 0-13 and 255 match my knowledge of the RFC." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T17:26:32.710Z" |
|---|
| summary | "RFC values 0-13 and 255 and every zlib OS_CODE (0-8, 10, 11, 13, 16, 18, 19 in zutil.h lines 99-188) are all in values; complete as the union of RFC 1952 and zlib's codes (10 and 11 are overloaded…" |
|---|
| changed | |
|---|
|
|
|---|