NAME
stan - stream analyser
SYNOPSIS
stan [ -bhvV ] [ -f filter ] [ -n number ] [ -p patlen ] [
file ... ]
DESCRIPTION
Stan creates statistics about the content of files or stdin.
This information can be used in many ways, e.g. to analyze
encrypted data or measure the quality of random numbers. The
program expects a list of files at the end of the command
line, if no files are specified standard input is used.
Stan is able to create three different types of statistics
General Statistics
Stan uses the bytes of the input data to calculate standard
statisic values. It calculates the mean, the median, the
deviation and the chi-squared value. If possible the
corresponding characters are printed after the decimal
value.
Pattern Statistics
Stan analyzes all patterns of the length patlen inside the
data stream and outputs the range and counts of patterns.
Bit Statistics
Bit statistics are measured using runs. Runs are a sequences
of the same bit, therefore stan analyses 0 runs and 1 runs.
In bit mode stan prints ratio of runs of a length to the
next length. This analysis fits the pseudo random number
criteria G1 by Golomb. Stan also prints the ratio of 0 runs
to 1 runs by the length of the runs, this analysis refers to
the second criteria G2 by Golomb.
OPTIONS
-b
Enable bit mode. Create bit statistics about the
stream.
-h
Print a help screen to stderr.
-v
Be verbose. In this mode stan prints verbose informa-
tion about the analysing process and also displays pro-
gress information. When analysing large files this is a
usefull option in order to see what acutally is happen-
ing.
-V
Display the version.
-f filter
Use a filter before passing the data to the analysing
process. The following filter may be used to restrict
the range of data.
0 No filter (default)
1 Analyse only printable characters.
2 Analyse only alphanumeric characters.
-n number
Display number of patterns. The default value is 10.
You should keep this value rather small since normally
a lot of patterns will be found in a data stream.
-p patlen
Analyse patterns from 1 to patlen length. The length of
the pattern is measured in bytes.
USAGE
The interpretation of output generated by Stan requires a
good mathematical / statistcal background. This manual can
not focus on all aspects of interpreting statistical values.
The general statistics are covered by most books about
statistics and analysis. There is a book, Shift Register
Sequences written by S.Goloumb (1967), with further informa-
tion about interpreting the bit statistics.
Some examples of stan can be found at the stan homepage,
http://www.roqe.org/stan.
NOTES
Stan was designed with efficency in mind, but if you are
using a large patlen , i.e. 6 or above, you may run into
memory problems, especially if you are analysing random or
nearly random data. Just remember that there are 256^6 pat-
terns of the length 6, which could require 281 terabyte of
memory!
If you discover bugs or have any improvements to stan con-
tact the author at kr@roqe.org. You can always grab the latest
version of stan from http://www.roqe.org/stan.
Man(1) output converted with
man2html