| Ticket UUID: | 570227 | |||
| Title: | crc32 not like zlib crc (with patch) | |||
| Type: | Bug | Version: | None | |
| Submitter: | cferril | Created on: | 2002-06-17 21:38:47 | |
| Subsystem: | None | Assigned To: | patthoyts | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2002-09-25 06:06:54 | |
| Resolution: | Works For Me | Closed By: | patthoyts | |
| Closed on: | 2002-09-24 23:06:54 | |||
| Description: |
This may be a moot point, but...
I am using the pure Tcl version of the crc32 package to
calculate crc's to match with crc's created from the zlib
version of crc code. I found that the following change
would correct the Tcl crc32 to return the same value as
the zlib c code returns. In the procedure crc::Crc32_tcl,
change the inital setting of crcval as follows:
set crcval [expr {$seed ^ 0xFFFFFFFF}]
I'm not using Trf so I don't know what crc code it uses or
if this change breaks that compatibility. I had figured
this crc package was the same as zlib; and I expect
others may too.
Hope this helps
| |||
| User Comments: |
patthoyts added on 2002-09-25 06:06:54:
Logged In: YES user_id=202636 Nothing happening. As this works for me I'm closing it to this effect. cferril added on 2002-07-10 13:50:01: Logged In: YES user_id=278906 I will as soon as I get a chance... patthoyts added on 2002-07-07 05:52:40: Logged In: YES user_id=202636 The crc32 test code checks that the Trf crc's and tcl crc values are the same. You can explicitly call each one even when Trf is available by using crc::Crc32_trf and crc::Crc32_tcl. As far as I can tell these two functions are producing identical results. Can you post a set of tests that illustrate the incorrect value and give the version of tcllib and trf that you are using. The crc package and Trf zlib values should be identical. | |||
Home
Blog
Docs
Downloads
Tickets
Timeline
Branches
Tags
Wiki