zlib stream returns negative checksums
Closed / Fixedcfdf80a2efc65e908271c3a27243e110c2bfc4abCreated 2 years agoUpdated 2 years ago
Descriptionmarkdown2024-07-11 13:46:47
% set compressor [zlib stream gzip -header {comment "A zlib demo"}]
::tcl::zlib::streamcmd_1
% $compressor put abcd
% $compressor checksum
-310194927
As shown above, a negative checksum is returned although both adler-32 and crc32 are specified as unsigned 32-bit ints. In fact,
% zlib crc32 abcd
3984772369
which is actually the same 32-bit pattern as -310194927.
This behavior is new with 9.0 (8.6 returns 3984772369 as expected)
apnadkarniplain2024-07-11 15:18:32
Fixed in [08603ee649].
apnadkarni Closed ticket [cfdf80a2ef].
[History diff]2024-07-12 16:06:25
jan.nijtmanswiki2024-10-18 15:18:35
Same problem existed on 8.6 and 8.7 too, so now it's backported.
Log in (anonymous is fine) to add a comment.