I wrote:
> this prints
>
> 0xF032519BL 0xF032519BL
> 0x90E3070AL 0x90E3070AL
>
> no time to sort out the int/long mess for binascii.crc32, but it pro-
> bably needs the same tweaking as PIL (which handles the CRC as
> two 16-bit numbers, to avoid sign hell).
I realized that I used 2.3 for testing
Thanks so much for the offer, I had a friend do this for
me and it works great.
Regards,
Larry Bates
Heiko Wundram wrote:
> Larry Bates wrote:
>
>>
>>
>>The algorithm looks very much like the source code for
>>binascii.crc32 (but I'm not a C programmer).
>
>
> Well... As you have access to the
Larry Bates wrote:
>
>
> The algorithm looks very much like the source code for
> binascii.crc32 (but I'm not a C programmer).
Well... As you have access to the code, you might actually just create a
thin Python-Wrapper around this so that you can get comparable results. In
case you're unable to
Larry Bates wrote:
Looking over the code, it seems very inefficient and hard to understand.
You really should check out the following.
http://sourceforge.net/projects/crcmod/
It will allow you to generate efficient CRC functions for use in Python
and in C or C++. The only thing you need to in
Larry Bates wrote:
> def CalculateCrc(buffer, crc):
/snip/
> The algorithm looks very much like the source code for
> binascii.crc32 (but I'm not a C programmer).
does your Python version give the right result ? if so, the following
might be somewhat helpful:
def test1(text, crc=0):
# l
Peter Hansen wrote:
> Larry Bates wrote:
>
>> I'm trying to get the results of binascii.crc32
>> to match the results of another utility that produces
>> 32 bit unsigned CRCs.
>
>
> What other utility? As Tim says, there are many CRC32s... the
> background notes on this one happen to stumble
Tim Peters wrote:
> [Raymond L. Buvel]
>
>>Check out the unit test in the following.
>>
>>http://sourceforge.net/projects/crcmod/
>
>
> Cool!
>
>
>>I went to a lot of trouble to get the results to match the results of
>>binascii.crc32. As you will see, there are a couple of extra operations
>
[Raymond L. Buvel]
> Check out the unit test in the following.
>
> http://sourceforge.net/projects/crcmod/
Cool!
> I went to a lot of trouble to get the results to match the results of
> binascii.crc32. As you will see, there are a couple of extra operations
> even after you get the polynomial a
Raymond L. Buvel wrote:
> Check out the unit test in the following.
>
> http://sourceforge.net/projects/crcmod/
>
> I went to a lot of trouble to get the results to match the results of
> binascii.crc32. As you will see, there are a couple of extra operations
> even after you get the polynomial
Peter Hansen wrote:
> Larry Bates wrote:
>
>> I'm trying to get the results of binascii.crc32
>> to match the results of another utility that produces
>> 32 bit unsigned CRCs.
>
>
> What other utility? As Tim says, there are many CRC32s... the
> background notes on this one happen to stumble
Larry Bates wrote:
> I'm trying to get the results of binascii.crc32
> to match the results of another utility that produces
> 32 bit unsigned CRCs.
What other utility? As Tim says, there are many CRC32s... the
background notes on this one happen to stumble out at the top of the
list in respo
[Larry Bates]
> I'm trying to get the results of binascii.crc32
> to match the results of another utility that produces
> 32 bit unsigned CRCs. binascii.crc32 returns
> results in the range of -2**31-1 and 2**21-1. Has
> anyone ever worked out any "bit twiddling" code to
> get a proper unsigned 32
I'm trying to get the results of binascii.crc32
to match the results of another utility that produces
32 bit unsigned CRCs. binascii.crc32 returns
results in the range of -2**31-1 and 2**21-1. Has
anyone ever worked out any "bit twiddling" code to
get a proper unsigned 32 bit result from binascii.
13 matches
Mail list logo