From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Zlib stream" |
|---|
| claim | "The zlib stream trailer is the Adler-32 of the uncompressed data, big endian: a = 1 + sum of bytes, b = sum of each step's a, both mod 65521, value b * 65536 + a. Test vectors: '' = 0x00000001, 'abc' = 0x024D0127, 'hello' = 0x062C0215, 'Wikipedia' = 0x11E60398, '123456789' = 0x091E01DE." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Zlib stream" |
|---|
| observed_in | |
|---|
|
|---|
| data | | effect | "4-byte big-endian checksum after the deflate data" |
|---|
| test_vectors | | input | "" |
|---|
| expected | "0x00000001" |
|---|
|
| input | "abc" |
|---|
| expected | "0x024D0127" |
|---|
|
| input | "hello" |
|---|
| expected | "0x062C0215" |
|---|
|
| input | "Wikipedia" |
|---|
| expected | "0x11E60398" |
|---|
|
| input | "123456789" |
|---|
| expected | "0x091E01DE" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "BASE 65521, NMAX 5552" |
|---|
| repo | "https://github.com/madler/zlib" |
|---|
| commit | "767c4c947852e143f582c85f14cf573411df1b35" |
|---|
| path | "adler32.c" |
|---|
| lines | "10-11" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Python zlib.adler32 on the inputs; zlib.compress(b'abc', 0) ends with 02 4D 01 27 and zlib.compress(b'hello') with 06 2C 02 15. A corrupted trailer gives 'incorrect data check'." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Adler-32" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T05:49:44.869Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:18:41.890Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read adler32.c at 767c4c9: BASE 65521, NMAX 5552, a/b accumulation; test vectors checked against known Adler-32 values." |
|---|
|
|
|---|