Binomial Data Compression Method without Loss of Information

This paper proposes an efficient method for compressing binary sequences of code length <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$n$</tex> without losing information. It differs from other similar compression methods by using a binary binomial number system (BNS) for numbering compressed sequences, which makes it possible to adapt the compression ratio to its required speed and error detection, along with the possibility of increasing resistance to tampering in modern methods of protection against unauthorized access. In addition, it is possible to implement the method in hardware form. The proposed method begins with counting the number of units <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$k$</tex> in a compressible binary sequence, transforming it into a code combination of an equilibrium code of the same code length <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$n$</tex> with the number of units <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$k, 0\leq k\leq n$</tex> . In this case, <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$k$</tex> represents a binary sequence with code length <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$q=\log_{2}n$</tex> . The binomial coefficient determines the number of equilibrium combinations in this code <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$C_{n}^{k}$</tex> . The equilibrium code combination is obtained after counting <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$k$</tex> by removing ones from the least significant bit (LSB) to the first 0 or zeros to the first 1. It is converted into the corresponding binomial code with code length <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$m$</tex> . The binomial code is converted into a binary code using the binomial enumeration function with <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$l=\log_{2}C_{n}^{k}$</tex> code length. Information <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$q=\log_{2}n$</tex> is added to the binary code, which is necessary to restore the binary sequence after compression. The binary sequence after compression in the form of a code word with <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$q$</tex> code length is transmitted over a separate communication channel after each compression operation while acting as a session key. The sum of <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$l+q=\log_{2}C_{n}^{k}+\log_{2}n$</tex> bits forms the code length of the compressed sequence. The difference <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$n-l-q$</tex> determines the compression efficiency of the original binary sequence. The smallest value, equal to <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$n-q$</tex> , is used when the original binary sequence consists of either only zeros <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$(k=0)$</tex> or only ones <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$(k=n)$</tex> , and the smallest when <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$k=n/2$</tex> . In all other cases most often encountered in practice, the code length of the compressed sequence is more significant than <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$q$</tex> . In this case, values of <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$k$</tex> are chosen for which the compression results of the corresponding sequences will be less than a given value. Therefore, they are not compressed, which increases the average compression rate. Uncompressed binary sequences for which <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$k$</tex> is calculated and <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$q$</tex> is determined to become noise-resistant, which is used to detect errors.