Hello,
I am looking for an algorithm to calculate the CRC32 code for a file under Windows. When i say "the CRC32 code" i mean the SAME one that Windows uses in Windows Explorer when creating or checking a .zip file. This would "apparently" be the same as any other .zip file CRC32 calculation, except none of the algorithms found on the web so far actually come up with the same CRC32 code.
I really need to calculate this myself not use someone else's program.
The reason for this could be caused by one of several things.
First, the readme APPNOTE for PKZip shows a "magic number" of 0xdebb20e3 but they do not specify what that actually does. The problem is that the general phrase "magic number" can refer to one of several things, such as the file starter signature (which it may be an older version or something) or maybe the starting CRC32 code, or maybe the ending xor code. So it can be any general constant that the author chose to reference as a "magic number". Some enlightenment on what they actually use that for would help in itself.
Second, they may have changed the starting code that they used a long time ago, but maybe they didnt.
Third, they may have changed the ending xor code, or dont use it at all, etc., but maybe they didnt.
Fourth, the polynomial generator seed they use could be different than that published on the web for PKZip.
Several of the algorithms i have tried from the web do produce the same code, but not the same as Windows. I even tried a web based CRC32 generator and it produced the same code but still not the same as Windows Explorer.
I have tried ONE program, called "7-zip", that does produce the same CRC32 code as Windows Explorer (for .zip files) but i do not have the source code, and i need the source code so i can write my own super fast CRC32 generator. I dont think there is any way around this because i need to read files from within a special program i already have written where the files are contained inside a .zip file. To check the validity of the files i need to generate the CRC32 code myself, and it must match the one in Windows or 7-Zip.
Note this has nothing to do with compressing the file itself, just calculating the CRC32 code so the file can be tested for corruption by recalculating the CRC32 code and then comparing to the CRC32 code stored in the .zip file with the file bytes.
Hey, thanks for any direct help or any help that could lead to a solution. I had been checking on the web for several hours yesterday and could not come up with a solution. The sad part is that the solution is probably a very simple fix, and sadder yet is this is what happens with incomplete documentation we see on the web quite often.
What else could help is information on how to reverse engineer the CRC32 generator used in some program. This would not violate any copyright because it is not part of the encryption algorithms used in .zip files sometimes and the CRC32 technique itself is not copyrighted.
I am looking for an algorithm to calculate the CRC32 code for a file under Windows. When i say "the CRC32 code" i mean the SAME one that Windows uses in Windows Explorer when creating or checking a .zip file. This would "apparently" be the same as any other .zip file CRC32 calculation, except none of the algorithms found on the web so far actually come up with the same CRC32 code.
I really need to calculate this myself not use someone else's program.
The reason for this could be caused by one of several things.
First, the readme APPNOTE for PKZip shows a "magic number" of 0xdebb20e3 but they do not specify what that actually does. The problem is that the general phrase "magic number" can refer to one of several things, such as the file starter signature (which it may be an older version or something) or maybe the starting CRC32 code, or maybe the ending xor code. So it can be any general constant that the author chose to reference as a "magic number". Some enlightenment on what they actually use that for would help in itself.
Second, they may have changed the starting code that they used a long time ago, but maybe they didnt.
Third, they may have changed the ending xor code, or dont use it at all, etc., but maybe they didnt.
Fourth, the polynomial generator seed they use could be different than that published on the web for PKZip.
Several of the algorithms i have tried from the web do produce the same code, but not the same as Windows. I even tried a web based CRC32 generator and it produced the same code but still not the same as Windows Explorer.
I have tried ONE program, called "7-zip", that does produce the same CRC32 code as Windows Explorer (for .zip files) but i do not have the source code, and i need the source code so i can write my own super fast CRC32 generator. I dont think there is any way around this because i need to read files from within a special program i already have written where the files are contained inside a .zip file. To check the validity of the files i need to generate the CRC32 code myself, and it must match the one in Windows or 7-Zip.
Note this has nothing to do with compressing the file itself, just calculating the CRC32 code so the file can be tested for corruption by recalculating the CRC32 code and then comparing to the CRC32 code stored in the .zip file with the file bytes.
Hey, thanks for any direct help or any help that could lead to a solution. I had been checking on the web for several hours yesterday and could not come up with a solution. The sad part is that the solution is probably a very simple fix, and sadder yet is this is what happens with incomplete documentation we see on the web quite often.
What else could help is information on how to reverse engineer the CRC32 generator used in some program. This would not violate any copyright because it is not part of the encryption algorithms used in .zip files sometimes and the CRC32 technique itself is not copyrighted.