Just wondering if there’s a CRC32 function or similar in JUCE already. Couldn’t find anything, and the forum search also didn’t give me anything I could use.
The idea is to take a MemoryBlock and create some check-number that I can compare with another number to be sure that the file is not corrupted.
EG: piano_sound.sound - at the end of the file I add the CRC32 number, and load everything BUT that number into the MemoryBlock. Now I create the CRC32 from the memory block and check if both matches.
Another option would add a parity bit to the stream, but that will make the file much larger. But at the same time, it will be easier and faster to load, I think…