I had to use bigint, which is sub-optimal in that it gets the correct results at the cost of vastly increased execution time.Only if you don't use an XS library to do the calculations. Math::BigInt supports several, including Bit::Vector (Math::BigInt::BitVect), Math::Pari (Math::BigInt::Pari), and Math::GMP (Math::BigInt::GMP).
Judging by the linked-to code, the hash is just summing the ASCII values of each byte.Hmm, I thought unpack supported braindead checksumming out of the box... something to do with a "%" sign, apparently. It might suffice to read a 64k block and apply unpack to it, with the proper format.
In reply to Re^2: Creating custom hash of file
by bart
in thread Creating custom hash of file
by 2ge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |