https://github.com/tripleee/entro.py
Simple entropy calculation tool for Python
https://github.com/tripleee/entro.py
Last synced: 11 months ago
JSON representation
Simple entropy calculation tool for Python
- Host: GitHub
- URL: https://github.com/tripleee/entro.py
- Owner: tripleee
- License: bsd-2-clause
- Created: 2013-11-19T12:32:51.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-15T06:21:29.000Z (almost 12 years ago)
- Last Synced: 2025-06-10T21:26:03.835Z (about 1 year ago)
- Language: Python
- Size: 141 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
entro.py
========
Simple command-line entropy calculation tool for Python.
The tool can calculate entropy for bits, nybbles, bytes, or
Unicode code points. Try with --verbose to see the progress
of the calculation.
To use from a library,
from entro import H, Bit, Nybble, Str, Utf8
bit_entropy = H(Bit(data))
nybble_entropy = H(Nybble(data))
byte_entropy = H(Str(data))
utf8_entropy = H(Utf8(data))
History / Credits
-----------------
Adapted from http://pythonfiddle.com/shannon-entropy-calculation/
which in turn features the following comment:
Stolen from Ero Carrera
http://blog.dkbza.org/2007/05/scanning-data-for-entropy-anomalies.html
LICENSE
-------
2-clause BSD license, as generated by the friendly Github repository creator.