A system and method for encrypting and/or compressing an input data string
is disclosed. The input data string is divided into a plurality of blocks
of data that each contains a plurality of bits of data. A block code is
used to identify the size of each of the blocks of data. The blocks of
data are analyzed to determine how frequently different groups of bits of
data are present within each block of data. The blocks of data are also
analyzed to determine whether certain relationships among the groups of
bits of data exist within the blocks of data. After the blocks of data
are analyzed, and in response to the analyses, a control code is
generated for each block of data through the use of a control code index.
After the control code for each block of data is generated, a position
code is also generated for each block of data in response to the control
code for the corresponding block of data. The control code, block code,
and position code for each of the blocks of data can then be combined to
produce an encrypted data string.