Skip to content

tripleee/entro.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple entropy calculation tool for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages