This article covers the details and explanation of my Shannon Informational Entropy calculator in PHP. If you just want to go straight to the source, it’s available on github here.
For more information and principles, read on…
What is it?
Maths stuff 🙂 The shannon informational entropy is an estimate of how many bits each byte of data should take.
The program examines a file and returns a number up to 8 bits. A higher number indicates a file with less entropy and a lower number indicates one with more.
Why this program?
I’m interested in compression. Most ideas I test using PHP. Therefore I prefer my tools to be in PHP too. I use this for a basic indication of the potential compressibility of a file.