Documentation ¶ Overview ¶ Package entropy provides Shannon entropy calculation functions. Index ¶ func Calculate(data []byte) float64 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. Source Files ¶ View all Source files shannon.go Click to show internal directories. Click to hide internal directories.