## 4 Theoretical Aspects of the Lossless Adaptive Binomial Data Compression Method  
Following the above-explained compression method, any binary sequence for which the number of units \(k\) is known is converted into a combination of an equilibrium code with \(C_{n}^{k}=\frac{n!}{R(n-k)! }\) combinations. Since \(k\) can vary from 0 to \(n\), the number of possible equilibrium codes will equal \(n+1\), and each of them will have the same value of the number of units in their combinations \(k=0\), 1, 2, \(\ldots\), \(n\). Accordingly, the number of equilibrium combinations is equal to \(C_{n}^{1}=n,\ldots,C_{n}^{k}=\frac{n!}{k!(n-k)!},\ldots,C_{n}^{n}=1\). Together they form a binary code with a total number of combinations of code length \(n\) equal to:  
\[C_{n}^{0}+C_{n}^{1}+\ldots+C_{n}^{k}+\ldots+C_{n}^{n}=2^{n} \tag{7}\]  
If we assume that compressible sequences are equally probable, then the equilibrium combinations corresponding to them will be the same in length. Then the average amount of information transmitted by one equilibrium combination is  
\[I=\log_{2}(C_{n}^{0}+C_{n}^{1}+\ldots+C_{n}^{k}+\ldots+C_{n}^{n})=\log_{2}2^{n }=n \tag{8}\]  
It is impossible to compress information without losing it in such a case. For binary messages to be compressed, different probabilities must characterize them \(p_{j},0\leq p_{j}\leq 1\), \(j=1,2,\ldots,2^{n}\). Then, the amount of data transmitted by one binary sequence from the information source is determined by the Shannon equation:  
\[I(A^{*})=-\sum_{j=1}^{2^{n}}p_{j}\log_{2}p_{j} \tag{9}\]  
The difference \(2^{n}-I\) determines the information redundancy of this source and, accordingly, the maximum possible compression ratio of the information transmitted:  
\[K=n/I \tag{10}\]  
Obviously, in the case of compression, only a part of the possible sequences from the number \(2^{n}\) the compression ratio \(K\) decreases. Still, this decrease will be insignificant if only sequences with a value of \(k\) close to \(n/2\) are excluded from the compression procedure. However, the overall compression speed will increase significantly. Thus, it becomes possible to adjust it adaptively by changing the compression ratio. Since \(k\) must be determined for all sequences, its presence makes it possible to increase the noise immunity of uncompressed sequences and, accordingly, to detect errors in them. This means that changing the compression ratio makes it possible to optimally adjust the compression rate and the noise immunity of the compressed sequences. This compression method requires prior knowledge of the statistics of transmitted messages, unlike, for example, the Shannon-Fano or Huffman statistical compression method, since it is automatically determined during the compression process, and with the highest possible accuracy, by analyzing the value of \(k\) for each compressible sequence. The same \(k\) also determines the compression ratio (10), taken for each binary sequence  
\[K=\frac{n}{\left[\log_{2}C_{n}^{k}\right]} \tag{11}\]  
Expression \(\log_{2}C_{n}^{k}\) is the amount of information in bits contained in the compressed sequence number with \(k\) ones. This information should be supplemented with information \(q=\log_{2}n\) about the value of \(k\). Then the amount of data after compression equal to  
\[I=\log_{2}n+\left[\log_{2}C_{n}^{k}\right] \tag{12}\]Accordingly, the compression ratio of the compressed sequence:  
\[K=\frac{n}{([\log_{2}n]+[\log_{2}C_{n}^{k}])} \tag{13}\]  
For \(k=0\) and \(k=n\)--compression ratio  
\[K=\frac{n}{[\log_{2}n]} \tag{14}\]  
reaches its maximum. The most significant value of the compression ratio \(k=1\) is observed. So, for example, with the compression \(n=32,k=1\) ratio \(K=\frac{32}{(5+5)}=3.2\) and with \(n=1024,k=1\), \(K=\frac{1024}{(10+10)}=512\). At the same time, the compression \(k=\frac{n}{2}\) coefficient \(K\) reaches its minimum since the binomial coefficient \(C_{n}^{k}\) takes the highest value in this case.