wkitt...@windstream.net wrote:
this is driving me battier than i already am :(
i have a binary file that contains a record of data... the first field
of the data is a crc32 value of a string of characters... the string of
characters is lower cased before being fed to the crc32 function... i
need to calculate the same crc32 value as what is stored in the file...
i've already checked the polynomial ($edb88320) is the same in both, the
original implementation (converted to TP4 in 1988) and this
implementation...
the original routine uses longint and speaks of initializing the
variable to $ffffffff before feeding it to the crc32 routine... the
existing routine in FPC says "Pre- and post-conditioning (one's
complement) is performed within this function so it shouldn't be done by
the application." but that doesn't give me the proper answer in this
case... i've tried using cardinal types and longint types to no avail...
Have you tried running your test case through a different
implementation? I use http://www.wolfgang-ehrhardt.de/crchash_en.html
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal