
Shannon Informational Entropy in PHP
Shannon information entropy attempts to predict the smallest possible average size of lossless encoding of data. This is useful when writing compression software as it provides a target estimate to which we can attempt to compress a file without losing any of the information contained inside it when it is subsequently decompressed.