approx_shannon_entropy

Crates.ioapprox_shannon_entropy
lib.rsapprox_shannon_entropy
version0.1.1
sourcesrc
created_at2021-04-17 02:05:33.202709
updated_at2021-04-18 21:01:24.015195
descriptionApproximate Shannon entropy, using micromath natural logarithm
homepage
repositoryhttps://github.com/hazelutf8/approx_shannon_entropy
max_upload_size
id385572
size9,357
(hazelutf8)

documentation

README

Approximate Shannon Entropy

A rust library to calculate the approximate Shannon entropy of a slice.

Usable on no_std due to use of approximate natural log from micromath.

Usage

Add this to your Cargo.toml

[dependencies]
approx_shannon_entropy = "0.1.1"

Examples

$ cargo run --example three_bits
Shannon Entropy (approximate bits per byte): 1
$ cargo build --example stdin_entropy
$ echo A | ./target/debug/examples/stdin_entropy
Commit count: 2

cargo fmt