Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CRC32 returns negative on big files
Message
From
01/08/2011 10:09:55
 
 
To
01/08/2011 09:59:54
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01519635
Message ID:
01519811
Views:
56
This message has been marked as the solution to the initial question of the thread.
>>(1) CRC32VFP()
>>Is the part of the filename a val(crc32) from vfp? Then it will be unsigned. So, have your .net class return a UInteger and interprete the part of the filename as UInteger
>>
>>That way, you can compare UInteger and UInteger types
>
>CRC32VFP is a proposed name of a class I would have to use to obtain the equivalent of what VFP does. After more research, it turns out that the way they do it is like this:
>
>
>lcCRC32 = SYS(2007, lcFileData, 0, 1)
>
>
>So, I am not sure I can get an equivalent of that in .NET.
>
>Is that Polynomal PKZip CRC complaint BTW? If yes, with that, they never get negative values.


(1)> Is that Polynomal PKZip CRC complaint BTW?

I don't know whether it's pkzip compliant. Should be tested. But a CRC is a CRC, so I expect both use the same algorithm

(2) > If yes, with that, they never get negative values.
It's just a matter of interpreting the 32 bits. It's a hex value. Is 0xFFFFFFFF in decimal 4,294,967,295 or -1


(3) If you leave your class as is, add a method crc32vfp() or crc32Unsigned()
Use your existing method which returns Integer, convert Integer to UInteger and return that
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform