From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "enum" |
|---|
| subject | "Library:Zlib" |
|---|
| claim | "zlib functions return Z_OK 0, Z_STREAM_END 1, Z_NEED_DICT 2, Z_ERRNO -1, Z_STREAM_ERROR -2, Z_DATA_ERROR -3, Z_MEM_ERROR -4, Z_BUF_ERROR -5, Z_VERSION_ERROR -6; z_errmsg[2 - code] holds the matching text ('need dictionary' ... 'incompatible version')." |
|---|
| scope | | level | "library" |
|---|
| applies_to | "Library:Zlib" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "zlib_return_code" |
|---|
| underlying_type | "int" |
|---|
| values | | 0 | "Z_OK" |
|---|
| 1 | "Z_STREAM_END" |
|---|
| 2 | "Z_NEED_DICT" |
|---|
| -1 | "Z_ERRNO" |
|---|
| -2 | "Z_STREAM_ERROR" |
|---|
| -3 | "Z_DATA_ERROR" |
|---|
| -4 | "Z_MEM_ERROR" |
|---|
| -5 | "Z_BUF_ERROR" |
|---|
| -6 | "Z_VERSION_ERROR" |
|---|
|
|---|
| complete | true |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "#define Z_OK 0 ... #define Z_VERSION_ERROR (-6); zutil.c lines 13-24 z_errmsg[10]" |
|---|
| repo | "https://github.com/madler/zlib" |
|---|
| commit | "767c4c947852e143f582c85f14cf573411df1b35" |
|---|
| path | "zlib.h" |
|---|
| lines | "181-189" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "inflateInit_ with a wrong z_stream size returns -6 (MinGW zlib1.dll 1.3.1); Python reports -3 for bad data." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Return codes" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T05:49:44.320Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T13:25:35.295Z" |
|---|
| summary | "Read zlib.h 181-189: all 9 return codes match; list is complete." |
|---|
| changed | |
|---|
|
|
|---|