
These C language functions support some statistical calculations
to determine the randomness of data:

    bit_entropy(bytea):     return Shannon bit entropy (value in [0.0-1.0]) of bytea
    byte_entropy(bytea):    return Shannon byte entropy (value in [0.0-8.0]) of bytea
    bit_entropy(bytea):     return Pearson chi-square stats of bytea

    expected_random_entropy(length, alphabet_size):
                            returns expected byte entropy of random data with length <length>
                            the number of unique characters <alphabet_size> (e.g. 64 for base64)


Feel free to use and modify this source as you want.
Use at your own risk.


In case you are having any problems or questions:
  
  mailto: christian [.] rossow <at> gmail (dot) com


Thanks to all people from #postgres who supported me,
in particular 'RhodiumToad' and 'dim'



CHANGELOG (Y4-MM-DD)
=======================

2010-03-12:  v1.0 released
2011-05-05:  v1.1 added expected_random_entropy() and documented code
