4 ms·
For lack of a better idea, that's how I once tested a toy PRNG I programmed. Feed output to rzip, check compression level, tweak a few knobs till it compresses
by dexen 15y ago
For lack of a better idea, that's how I once tested a toy PRNG I programmed. Feed output to rzip, check compression level, tweak a few knobs till it compresses worst.
However, that's not a good guaranty of true randomness. Encrypted data (for decent encryption algorithms) has high entropy just as well, even if the plaintext is non-random.
On the other hand, if you have a truly random process with very low probability of occuring, its output would indeed compress well via, for example, RLE.
The property of not being compressable is about both entropy and uniform distribution. See also http://en.wikipedia.org/wiki/Randomness_extractor http://en.wikipedia.org/wiki/Randomness_extractor