ENTROPY(1)

NAME
entropy - compute data entropy

SYNOPSIS
entropy [-b block_size] file...

DESCRIPTION
entropy reports entropy values for the named files (standard input by default). The entropy is computed with Shannon's formula applied to byte streams. The result gives the average number of bits of information per byte, under the assumption that the input has no specific structure. For each file, entropy is reported as follows:
file file_entropy block_count min_entropy max_entropy Fields are tab separated.

file
    The name of the file.

file_entropy
    The entropy computed over the entire file contents.

block_count
    The number of block_size blocks used for the minimal and maximal per-block entropy computation.

min_entropy, max_entropy
    The minimal and maximal per-block entropy for the named file. No per-block entropy is computed for partial blocks.

Options:

-b block_size (default: 8192)
    The block size to be used for per-block entropies.

BUGS
Entropy values can be misleading.

•   The per-file entropy computed over the entire file is larger than any per-block entropy value for that same file.

•   The entropy values as reported by this program are valid only for unstructured input. With real data such as text the result is an overestimate.

HISTORY
This entropy command was written for the coroner's toolkit.

LICENSE
This software is distributed under the IBM Public License.

SEE ALSO
C.E. Shannon, A mathematical theory of communication. Bell System Technical Journal 27 (1948) 379-423, 632-656.
http://cm.bell-labs.com/cm/ms/what/shannonday/shannon1948.ps.gz

AUTHOR(S)
Wietse Venema
IBM T.J. Watson Research
P.O. Box 704
Yorktown Heights, NY 10598, USA