strings

package module
v1.171.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

* Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved. * SPDX-License-Identifier: Apache-2.0

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.

Directories

Path Synopsis
casing module

Jump to

Keyboard shortcuts

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