## 1 Introduction  
With an increase in the volume of transmitted information and speed and reliability, the task arises of an effective method for reducing the volume of transmitted data, mainly using lossless data compression methods. Various lossless compression algorithms are widely used in areas such as medicine [1], industrial [2], the Internet of Things (IoT) [3], databases [4], cloud computing [5], especially communication networks [6], and space data system [7]. Finding an effective data compression algorithm for any application remains relevant [8]. Modern lossless data compression methods combine entropy coding and general-purpose compression techniques. For example, the main algorithms of universal compressions, such as LZ77/78 (Lempel-Ziv coding 1977/1978), LZW (Lempel-Ziv-Welch), and LZMA (Lempel-Ziv-Markov chain algorithm), are based on a dictionary, zip (LZ77 + Huffman), gzip(LZ77 + Huffman), 7-zip (LZMA + arithmetic coding) and bzip2 (block sorting + Move-to-Front + Huffman) [9; 10]. Also used is LZSS [10; 11], which optimizes matching operations in the look-up table to assign fewer bits for compressed data than LZ77 [12; 13; 14]. One of the main compression methods is the class of statistical compression methods since their implementation requires knowledge only of the probability distribution of compressed messages. They are mainly intended for communication systems and are quite versatile for them. Their main disadvantage is the need for statistical data. In parallel with statistical methods, other compression methods are being developed that, as a rule, are of a special nature and do not require direct statistical tests. One such method is the numbering method, which usually compresses mathematical objects such as permutations or combinations. Their use is applicable in information security and error protection systems. In [15], for the need to improve health information systems for health monitoring, lossless electroencephalogram (EEG) data compression is applicable [16], and proposed a lossy EEG compression model based on fractals for network traffic. manifest the advantage of this method. In [17], a simpler alternative to arithmetic coding is presented. The advantage of this method is its simplicity and the possibility of using it for simultaneous data encryption or as a block of cryptosystems. The disadvantage of this method is that it requires the creation and storage of encoding tables and decoding. In [18], a mathematical model of the method of compression of equilibrium combinations based on binary binomial numbers and a mathematical model of generalized binomial compression of binary sequences are shown, but this method is not adaptive. Meanwhile, ref. [19] presents a mathematical model for compressing binary sequences by binomial numbers. This paper proposes a universal adaptive method for compressing binary sequences of unlimited length \(n\) without losing information. The code length of the original binary sequence \(n\) will be greater than the length of the number \(m\), which determines the compression effect. Its value is determined by the length difference between the original code length \(n\) of the binary sequence and the compressed length \(m\). The more significant this difference, the greater the compression effect. It will take the largest value in the case when the original binary sequence consists of either only zeros (\(k=0\)) or only ones (\(k=n\)), and the smallest value when \(k=n/2\). In the first case, the compression effect will be determined only by the number of bits required to transmit the value \(k\), which is always less than \(n\). In this case, the compressed binary sequence number is not transmitted. Therefore, this case will be the most favorable for compression. In practice, it occurs, for example, in television binary images, where there are empty or completely dark lines. In the second case, when \(k=n/2\), the code length of the number \(m\) approximately coincides with the code length of \(n\).