I'm trying to use the streaming compression library to calculate the CRC-32 value of a file.
From what I understand, the .Readfile method should be able to do that. However it doesn't return any value.
The method is returning the correct number of bytes read, but just no CRC value. According to the docs, "When the eAction parameter is specified as cfpCalculateCRC32 or cfpCalculareAdler32, the ReadFile method returns a long integer variant containing the computed checksum value."
Here's my code (of course I am passing an actual license key, and .License returns true)
I have also tried assigning a compression method object to the .CompressionMethod just in case, but it made no difference.
Am I doing something wrong, or is this a bug?
Dim xComp
Dim lngCRC
Dim lngBytesRead
lngCRC = 0
Set xComp = Server.CreateObject("Xceed.StreamingCompression")
Call xComp.License( "license key" )
lngCRC = xComp.ReadFile(Server.MapPath("testfile.txt"), 0, 0, 2, True, lngBytesRead)
Response.write "Bytes read: " & lngBytesRead & "<br/>"
Response.write "CRC: " & lngCRC & "<br/>"