strings

package
v1.61.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateStringShannonEntropy

func CalculateStringShannonEntropy(str string) (entropy float64)

CalculateStringShannonEntropy measures the Shannon entropy of a string the returned value is a bits/byte 'entropy' value between 0.0 and 8.0, 0 being no, and 8 being maximal entropy. See http://bearcave.com/misl/misl_tech/wavelets/compression/shannon.html for the algorithmic explanation. Code comes from https://rosettacode.org/wiki/Entropy#Go:_Slice_version

Types

This section is empty.

Jump to

Keyboard shortcuts

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