Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CRC32 returns negative on big files
Message
From
01/08/2011 09:46:05
 
 
To
01/08/2011 08:28:36
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:
01519805
Views:
23
>Both are 'polynomal PKZip CRC32 compliant'
>
>Whether you return an Integer (which can be < 0) or a UInteger (always >= 0) , does not matter. It's the bit pattern that matters, ie
>
>
>0xFFFFFFFF
>
>is -1 if it is an Integer
>is  4,294,967,295 if it is a UInteger
>
>
>So,
>
>
> dim xx as Integer = &HFFFFFFFF  ' -1
>
>or
>dim xx as UInteger = &HFFFFFFFFUI ' 4,294,967,295 
>
>
>Both bit structures are equal

Well, a code I am converting right now needs access to my CRC32 class to collect the CRC32 of a file. However, this has to be compared with a CRC32 value which has been stored long time ago as part of the file name. So, using my class we wouldn't be able to compare and find a match. So, at this point, we are looking at building a secondary CRC32VFP(), which would be the one compliant with the old code so we can use it in one specific location where we would have to lookup for a specific string in the file name in regards to that.

Unless you have a suggestion in the .NET class I am using to be able to support that.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform