entropy

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package entropy provides Shannon entropy calculation functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Calculate

func Calculate(data []byte) float64

Calculate computes the Shannon entropy (base 2, in bits per byte) of data. It returns 0.0 for a degenerate distribution (e.g. all identical bytes, including the empty input) up to ~8.0 for a perfectly uniform distribution over all 256 byte values.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL