Challenges and Solutions in Selecting Optimal Lossless Data Compression Algorithms Md. Atiqur Rahman, MM Fazle Rabbi Abstract The rapid growth of digital data has heightened the demand for efficient lossless compression methods. However, existing algorithms exhibit trade-offs: some achieve high compression ratios, others excel in encoding or decoding speed, and none consistently perform best across all dimensions. This mismatch complicates algorithm selection for applications where multiple performance metrics are simultaneously critical, such as medical imaging, which requires both compact storage and fast retrieval. To address this challenge, we present a mathematical framework that integrates compression ratio, encoding time, and decoding time into a unified performance score. The model normalizes and balances these metrics through a principled weighting scheme, enabling objective and fair comparisons among diverse algorithms. Extensive experiments on image and text datasets validate the approach, showing that it reliably identifies the most suitable compressor for different priority settings. Results also reveal that while modern learning-based codecs often provide superior compression ratios, classical algorithms remain advantageous when speed is paramount. The proposed framework offers a robust and adaptable decision-support tool for selecting optimal lossless data compression techniques, bridging theoretical measures with practical application needs. keywords Lossless Data Compression, Algorithm Selection, Multi-criteria Optimization, Compression Ratio, Encoding Time, Decoding Time, Performance Evaluation. 1 Introduction Over the past few decades, the rate at which data are generated has increased dramatically, resulting in significant processing costs Bondžulić et al. 2024 ; Zhang et al. 2024 ; Rahman et al. 2018 ; Masmoudi et al. 2014 ; Rahman and Hamada 2020 ; Li et al. 2024 ; Rahman et al. 2022 . Therefore, the need for data compression is greater than ever. Although lossy compression is commonly used in multimedia communication, achieving a higher compression ratio at the cost of quality degradation, certain data, such as artistic, scientific, and medical data, must be preserved intact Rahman et al. 2024 . Thus, lossless data compression is important in many fields Rhee et al. 2020 . Lossless data compression methods can be categorized as either learning-based or non-learning-based codecs. State-of-the-art non-learning-based techniques include Portable Network Graphics (PNG) Fu et al. 2024 ; Bhattacharjee and Ghosh 2024 ; Boutell and Lane 1997 ; Dai et al. 2021 ; Qin et al. 2024 ; Lin et al. 2021 , Better Portable Graphics (BPG) Bellard 2015 ; Zhang et al. 2024 ; Rahman et al. 2021 , JPEG XR Dufaux et al. 2009 ; Rahman and Hamada 2023 , JPEG 2000 Rahman et al. 2018 ; Rabbani 2002 ; Elmeligy et al. 2024 ; Rahman and Hamada 2021 , JPEG-LS Weinberger et al. 2000 ; Rahman and Hamada 2019 , WebP Weinberger et al. 2000 , LCIC Version 2000 , JPEG-XL Azami et al. 2024 ; Alakuijala et al. 2019 , Context-Based Adaptive Lossless Image Codec (CALIC) Kim and Cho 2013 , AV1 Image File Format (AVIF) Han et al. 2021 , H.264 Wu and Memon 1997 , and FLIF Sneyers and Wuille 2016 ; Gümüş and Kamisli 2024 . These techniques compress images by reducing spatial redundancy. Learning-based techniques include CBPNN Schiopu and Munteanu 2018a , MP-CNN Schiopu and Munteanu 2018b , REP-CNN Mentzer et al. 2019 , L3C Reed et al. 2017 , MS-PixelCNN Rhee et al. 2020 , CWPLIC Rhee et al. 2020 , IDF Hoogeboom et al. 2019 , PixelRNN Van Oord et al. 2016 , and PixelCNN Oord et al. 2016 ; Zhu et al. 2024 ; Chen et al. 2023 . Learning-based methods provide the technology needed to develop productive solutions with improved performance compared with classical techniques Schiopu and Munteanu 2020 . PixelCNN Van Oord et al. 2016 , a deep convolutional network model, has been compared with deep diffusion [18], deep Gaussian mixture models Han et al. 2021 , RIDE Wiegand et al. 2003 , Row LSTM, and Diagonal BiLSTM on the CIFAR-10 dataset. Diagonal BiLSTM provided a higher compression ratio, whereas PixelCNN was the fastest architecture. MS-PixelCNN is 105 times faster than PixelCNN Mentzer et al. 2019 . Mentzer et al. Mentzer et al. 2019 proposed a learning-based lossless image compression technique, L3C, and compared it with two learning methods (PixelCNN and MS-PixelCNN) and four classical techniques (PNG, JPEG 2000, WebP, and FLIF) on the ImageNet32 dataset Krasin et al. 2017 . L3C was found to be approximately 5.06\times 10^{2} times faster than MS-PixelCNN and provided 20.6% and 24.4% more compression power than MS-PixelCNN and PixelCNN, respectively. The authors also compared L3C with PNG, JPEG 2000, WebP, and FLIF on 512\times 512 crops from the DIV2K dataset Agustsson and Timofte 2017 . FLIF achieved higher compression ratios than the other methods. L3C was approximately 8.08 times faster for encoding and 2.81 times slower for decoding than FLIF. However, JPEG 2000 and PNG provided faster encoding and decoding, respectively. Rhee et al. Rhee et al. 2020 proposed a context-adaptive lossless image compression technique using a multilayer perceptron (MLP) that requires less encoding and decoding time than a convolutional neural network (CNN). The authors compared it with several classical methods (PNG, JPEG 2000, WebP, LCIC, and FLIF) and a learning-based technique (L3C) on three high-resolution datasets: McMaster Li et al. 2018 , Open Images Krasin et al. 2017 , and DIV2K Agustsson and Timofte 2017 . Compared with the classical codecs, the new method outperformed PNG, JPEG 2000, WebP, and LCIC across all datasets, whereas FLIF achieved compression to fewer bits per pixel (bpp) in the Open Images dataset. The new method also achieved a lower bpp than L3C in all datasets. However, it had the lowest encoding and decoding speeds among the methods, except that it offered a 13.71% improvement over the encoding speed of L3C. Although methods based on CNNs and recurrent neural networks (RNNs) Schiopu and Munteanu 2018a ; Reed et al. 2017 ; Rahman et al. 2022 ; Oord et al. 2016 ; Rippel and Bourdev 2017 ; Schiopu et al. 2019 ; Rahman et al. 2018 ; Rahman and Hamada 2021 ; Dinh et al. 2014 ; Germain et al. 2015 ; Dai et al. 2024 ; Qian et al. 2024 achieved higher compression ratios than Rhee et al.’s method, they were impractical due to the extended time required for encoding and decoding: over an hour on a GPU. JPEG 2000 was the fastest in encoding, with their method being 99.88% slower. Additionally, PNG and JPEG 2000 were both about 961 times faster than their method. RasterLite2 Gaia-gis.it 2024 was used to apply various lossless compression techniques (LZ4 GitHub 2024 , DEFLATE Deutsch 1996 , ZSTD GitHub 2024 , LZMA 7-zip.org 2024 , PNG, WebP, and JPEG 2000) to the Orthophoto imagery (grayscale) dataset. Among these, WebP provided the highest compression ratio, LZ4 the fastest encoding, and PNG the fastest decoding. In Rhee et al. 2020 ; Graves 2013 , compression methods were compared on the basis of compression ratio, encoding time, or decoding time. However, in most other works Masmoudi et al. 2014 ; Boutell and Lane 1997 ; Dufaux et al. 2009 ; Bellard 2015 ; Dufaux et al. 2009 ; De Simone et al. 2009 ; Rabbani 2002 ; Weinberger et al. 2000 ; Version 2000 ; Kim and Cho 2013 ; Alakuijala et al. 2019 ; Sneyers and Wuille 2016 ; Wu and Memon 1997 ; Schiopu and Munteanu 2019 ; Schiopu and Munteanu 2018a ; Schiopu and Munteanu 2018b ; Mentzer et al. 2019 ; Reed et al. 2017 ; Hoogeboom et al. 2019 ; Van Oord et al. 2016 ; Oord et al. 2016 ; Schiopu and Munteanu 2020 ; Han et al. 2021 ; Wiegand et al. 2003 ; Zhang et al. 2011 ; Rippel and Bourdev 2017 ; Schiopu et al. 2019 ; Dinh et al. 2014 ; Germain et al. 2015 ; Chrabaszcz et al. 2017 ; Collet 2018 ; Gaia-gis.it 2024 ; Deutsch 1996 ; GitHub 2024 ; 7-zip.org 2024 ; Lin 2020 ; Suzuki 2018 ; Patwa et al. 2020 ; Alzahir and Borici 2014 ; Crandall and Bilgin 2014 ; Lee et al. 2017 ; Shen et al. 2016 ; Liu and Chen 2018 ; Karimi et al. 2012 , only compression ratios have been used to evaluate compression techniques. Although some applications prioritize higher compression ratios, others prioritize faster encoding or decoding speeds. In many applications, however, two or all of these factors are important. This work thoroughly compares the performance of various compression techniques on publicly accessible datasets. Our research aims to provide a method to answer the following question for a given application: Which algorithm is the most efficient when considering compression ratio and encoding time, compression ratio and decoding time, encoding time and decoding time, or all three parameters equally? This article is structured as follows: The purpose of the research is described in Section 2 . The proposed methodology is introduced in Section 3 . In Section 4 , experimental findings are presented and analyzed. In Section 5 , the effectiveness of the approach is demonstrated. Lastly, in Section 6 , we draw conclusions based on our study. 2 Purpose The development of learning-based lossless data compression techniques is progressing rapidly. Such methods include L3C Rhee et al. 2020 , deep Gaussian mixture models van den Oord and Dambre 2015 ; Van den Oord and Schrauwen 2014 , super-resolution-based compression (SReC) Cao et al. 2020 , CBPNN Schiopu and Munteanu 2019 , PixelRNN Van Oord et al. 2016 , CWPLIC Rhee et al. 2020 , deep diffusion Sohl-Dickstein et al. 2015 , PixelCNN Van den Oord et al. 2016 , Gated PixelCNN Van den Oord et al. 2016 , REP-CNN Schiopu and Munteanu 2018b , MS-PixelCNN Reed et al. 2017 , IDF Hoogeboom et al. 2019 , Row LSTM Van Oord et al. 2016 , Diagonal BiLSTM Van Oord et al. 2016 , LLICTI Kamisli 2022 , and MSPSM Zhang et al. 2020 . Additionally, many non-learning methods are widely used in various applications, such as the High-Efficiency Image File Format (HEIF) Heikkilä 2016 , lossless RLE compression of Amiga IFF images (ILBM) Rusyn et al. 2016 , the context-based, adaptive, lossless image codec (CALIC) Wu and Memon 1996 , lossless compression of black and white images (JBIG2) Ye and Cosman 2001 , JPEG-LS Weinberger et al. 2000 , JPEG XL Alakuijala et al. 2020 , JPEG XR Dufaux et al. 2009 , TIFF Sindhu and Rajkamal 2009 , arithmetic coding Rissanen and Langdon 1979 , byte pair encoding Shibata et al. 1999 , DEFLATE Oswal et al. 2016 , lZ4 Bartík et al. 2015 , LZMA Parekar and Thakare 2014 , LZO Oberhumer 2008 , LZRW Bartík et al. 2015 , LZX Salomon 2004 , and LCIC Kim and Cho 2013 . When working with heterogeneous datasets, a variety of learning and non-learning lossless compression techniques can be applied. These techniques are compared based on the compression ratio, encoding time, and decoding time. With advancements in technology, users’ demands are increasing. Some applications require a lossless compression technique that provides a higher compression ratio or faster encoding or decoding processes. Selecting an algorithm solely on the basis of compression ratio, encoding time, or decoding time is straightforward. However, some applications may require a high compression ratio and a short encoding time, whereas others may need short encoding and decoding times, a high compression ratio with a short decoding time, or a combination of all three. Selecting the best algorithm in these cases is challenging. For example, for the DIV2K dataset Mentzer et al. 2019 , Table 1 compares the average encoding and decoding times, as well as the bits per subpixel (bpsp), obtained in Mentzer et al. 2019 for five different compressors: JPEG 2000, PNG, WebP, FLIF, and L3C. According to the authors, L3C offers a lower bpsp than JPEG 2000, PNG, and WebP. However, L3C’s encoding process is much slower than these methods. Among the algorithms, FLIF offers the most compression power, but its encoding process is 85.93%, 87.62%, 99.14%, and 90.87% slower than L3C, PNG, JPEG 2000, and WebP, respectively. It can be seen from the table that JPEG 2000 and PNG achieve shorter encoding and decoding times, respectively. Therefore, it is difficult to identify the superior algorithm when two or all three performance measures are important. This research article proposes a mathematical method for choosing a superior lossless data compression algorithm on the basis of any possible combination of compression ratio, encoding time, and decoding time. Table 1 : Experimental results of five different compressors on the DIV2K dataset, published in Mentzer et al. 2019 Compressor Encoding Time (s) Decoding Time (s) bpsp JPFG 2000 1.48\times 10^{-2} 2.26\times 10^{-4} 3.471 PNG 0.213 6.09\times 10^{-5} 4.733 WebP 0.157 7.12\times 10^{-2} 3.447 FLIF 1.72 0.133 3.291 L3C 0.242 0.374 3.386 3 Proposed Method A fundamental principle of data compression is that the most efficient data compression algorithm is the one with the highest compression ratio r combined with the shortest encoding time e and decoding time d . This statement can be formulated by expressing the performance p of an algorithm as p\propto\begin{cases}r&\text{for }x=r,\\ \frac{1}{x}&\text{for }x\in\{e,d\}.\end{cases} (1) Let us assume that n images are compressed using m distinct lossless data compression techniques. By applying the following equation, we can determine the average performance a_{(x,j)} of an algorithm denoted by j=(1,2,3,\dots,m) in terms of the compression ratio, encoding time, and decoding time: a_{(x,j)}=\frac{1}{n}\sum_{i=1}^{N}x_{i}\quad\text{for}\;x_{i}\in\{r,e,d\}. (2) To assess the effectiveness of a specific method relative to others, all average performances need to be mapped to a standard range. Additionally, the proportionality relationships ( 1 ) must be taken into account. The resulting performance c_{(x,j)} of algorithm j according to performance measure x can be formulated as follows: \begin{split}c_{(x,j)}&\propto\frac{a_{(r,j)}}{\sum_{t=1}^{m}a_{(r,t)}}\text{ for }x=r;\\ c_{(x,j)}&\propto\frac{1}{a_{(x,j)}}\text{ for }x\in\{e,d\}.\end{split} (3) These relationships can be rewritten with constants of proportionality k_{r} , k_{e} , and k_{d} : \begin{split}c_{(x,j)}=k_{x}\times\left(\frac{\sum_{t=1}^{m}a_{(x,t)}}{a_{(x,j)}}\right)\text{ for }x=r;\\ \quad c_{(x,j)}=k_{x}\times\frac{1}{a_{(x,j)}}\text{ for }x\in\{e,d\}.\end{split} (4) Determining the optimal values for k_{r} , k_{e} , and k_{d} is the most complex part of the procedure and is significant for the following reasons: 1. Calculating the optimal values for these constants ensures a suitable balance between compression ratio, encoding time, and decoding time. 2. A good balance between these parameters assigns appropriate importance to each, providing the most effective strategy for a given situation. 3. If the parameters are imbalanced, undue emphasis may be placed on one of the factors, leading to erroneous predictions. Let us choose k_{r} =1, k_{e}=\sum_{v=1}^{m}a_{e,v} , and k_{d}=\sum_{v=1}^{m}a_{d,j} . In this scenario, every compression method can have an impact on each performance metric. To prevent the results from being affected by a single compression method, all values of c_{r,j} , c_{e,j} , and \ c_{d,j} must be averaged across all m techniques. The following equation is used to eliminate any potential biases introduced by specific methods: w=\frac{1}{m}\sum_{j=1}^{m}c_{x,j}\quad\text{for }x\in\{r,e,d\} (5) where w=x when x=r , w=y when x=e , and w=z when x=d . When x is substantially smaller than y and z , inaccurate predictions may occur. Thus, the value of x must be fine-tuned to align more closely with y and z , which can be achieved by determining the optimal value for k_{r} . Let us consider two variables u and v . To attain a balance between the performance metrics, we use the following equations, which make adjustments to align x with y and z , respectively: x\times u=y (6) x\times v=z. (7) However, it is crucial to ensure that any change in x must have an equivalent effect on both y and z . This is achieved by averaging u and v , which enhances the balance between x , y , and z . Thus, k_{r} is determined by k_{r}=\frac{{u+v}}{2}=\frac{{y+z}}{{2\times x}}. (8) By substituting the values of k_{r} , k_{e} , and k_{d} , equation ( 4 ) can be written as \begin{split}c_{x,j}=\frac{(y+z)\times a_{r,j}}{2\times x\times\sum_{j=1}^{m}a_{r,j}}\text{ for }x=r;\\ \;c_{x,j}=\frac{\sum_{j=1}^{m}a_{x,j}}{a_{x,j}}\text{ for }x\in\{e,d\}.\end{split} (9) The parameters r , e , and d are now balanced. We can now determine the grand total performance g_{j}^{x_{1},x_{2}} of the j th technique. When considering two factors, this is given by \begin{split}g_{j}^{x_{1},x_{2}}=\frac{\sum_{k\in\{x_{1},x_{2}\}}c_{k,j}}{\sum_{i=1}^{m}\left(\sum_{k\in\{x_{1},x_{2}\}}c_{k,j}\right)}\times 100,\\ \quad\text{where }x_{1},x_{2}\in\{r,e,d\}\text{ and }x_{1}\neq x_{2}.\end{split} (10) Here, x_{1},x_{2}\in\{r,e,d\} are the selected pair of factors. When considering all three factors, the grand total performance is g_{j}^{r,e,d}=\frac{\sum_{k\in\{r,e,d\}}c_{k,j}}{\sum_{i=1}^{m}\left(\sum_{k\in\{r,e,d\}}c_{k,j}\right)}\times 100. (11) Algorithm 1 can now be applied to determine the most effective method ml[sm] along with its associated performance value gp for a given scenario. Here, ml denotes a list of all available methods, and sm is the index of a selected method. Algorithm 1 Finding the Optimal Method 1: g , m ; Here, g represents the performance values of each method, and m is the total number of methods. 2: SelectedMethod , GrandTotalPerformance ; Here, SelectedMethod is the method with the highest performance, GrandTotalPerformance is its associated performance value, ml denotes a list of all available methods, and sm is the index of the selected method. 3: \texttt{gp}\leftarrow-\infty ; Initialize gp , the variable that stores the best performance value, to a very low number. 4: for i\leftarrow 1 to m do 5: p\leftarrow g_{i} ; Assign the performance value of the i th method to the variable p . 6: if p>\texttt{gp} then 7: \texttt{gp}\leftarrow p ; If the current performance p is greater than the previously stored best performance gp , update gp . 8: \texttt{sm}\leftarrow i ; Store the index i of the method that achieved the best performance in sm . 9: end if 10: end for 11: return ml[sm] , gp ; Return the method corresponding to the index sm from the list of methods ml , along with its best performance value gp . 4 Results and Analysis This section uses the proposed method to analyze recent findings in the literature. Performance measures for entropy coding techniques published in 2019 Rahman and Hamada 2019 are presented in Table 2 . These show that the Huffman and LZW techniques perform encoding and decoding faster than Arithmetic. However, compared with Huffman, LZW achieves a slightly higher compression ratio, making it a better choice for applications in which storage space is a critical factor. The results of the proposed technique in this study are evaluated using the data in Table 2 . Fig. 1 illustrates the outcomes. Table 2 : Outcomes of entropy coding techniques Rahman and Hamada 2019 Compressor ( e ) ( d ) ( r ) Huffman 0.2488 0.0062 1.4282 LZW 0.1054 0.0266 1.5455 Arithmetic 4.0178 4.7208 1.4380 Figure 1 : Outcome of the proposed approach for the results in Table 2 Fig. 1 shows a comparison of three entropy coding techniques, Huffman, LZW, and Arithmetic, using different combinations of parameters. When considering encoding time and decoding time, as well as encoding time and compression ratio, Huffman and LZW achieve the best results, with 77.92% and 35.66%, respectively. Conversely, when combining decoding time and compression ratio or when considering all three parameters, Huffman performs best, with 64.79% and 63.37%, respectively. Therefore, LZW is a superior choice if the encoding speed and compression ratio are the primary concerns. However, if other factors are also considered, Huffman coding is the preferred entropy coding technique. Table 3 presents the results of research published in 2021 Rahman et al. 2021 . In this case, FLIF achieves the highest compression ratio among all techniques, with a value of 4.4508. JPEG-XR and PNG exhibit the fastest encoding and decoding times, respectively. Specifically, PNG has an encoding time of 1.1259 seconds and a decoding time of 0.0719 seconds, whereas JPEG-XR has an encoding time of 0.1668 seconds and a decoding time of 0.1614 seconds. The results of the proposed approach for the data in Table 3 are shown in Fig. 2 . Table 3 : Outcomes of transform techniques Rahman et al. 2021 Compressor(C) ( e ) ( d ) ( r ) JPEG-LS 0.2467 0.279 3.9616 JPEG 2000 0.597 0.563 3.4189 Lossless JPEG 0.3257 0.1331 2.6661 PNG 1.1259 0.0719 3.2847 JPEG-XR 0.1668 0.1614 2.5307 WebP 1.33 1.1156 3.8517 FLIF 5.1033 1.1354 4.4508 Figure 2 : Outcome of the proposed approach for the results in Table 3 Fig. 2 displays percentages for various combinations of encoding time, decoding time, and compression ratio for several image compression techniques, namely, JPEG-LS, JPEG 2000, lossless JPEG, PNG, JPEG-XR, WebP, and FLIF. The percentages reflect the relative importance of these factors when combined. When considering decoding time and compression ratio, PNG is the optimal choice, but JPEG-XR is the best option for all other combinations. Bits per subpixel (bpsp) measures the number of bits required to represent each color component of a single pixel in an image. Each pixel is divided into three smaller subpixels—red, green, and blue—each of which can be represented by 8 bits. Table 4 summarizes the results of a study by Cao et al. Cao et al. 2020 on the ImageNet64 Chrabaszcz et al. 2017 dataset, comparing several classical and learning-based methods. The bpsp values are converted to compression ratios ( r ) using r=\frac{8}{\text{bpsp}}. (12) Although PNG encodes and decodes data faster than the other methods, IDF achieves a higher r value for this dataset. To identify the most suitable compression method for a particular application, the proposed approach can be applied to the results in Table 4 , with the results shown in Fig. 3 . It can be seen that PNG is the most effective for all combinations. Therefore, for this dataset, PNG appears to be the most suitable choice unconditionally. Table 4 : Outcomes of some learning and non-learning compressors Cao et al. 2020 C ( e ) ( d ) ( r ) PNG 0.0013 0.00008 1.3937 WebP 0.021 0.00021 1.7241 FLIF 0.022 0.01 1.7621 L3C 0.031 0.023 1.81 IDF 1.33 1.02 2.0513 SReC 0.044 0.071 1.8648 Figure 3 : Outcome of the proposed approach for the results in Table 4 The Silesia compression corpus REFERENCELINK7 2024 contains 211,938,580 bytes. Researchers at Facebook Zstandard 2024 ; Facebook 2024 applied several text compressors to this corpus and calculated the compression ratios, as well as the compression speed (CS) and decompression speed (DS) in megabytes per second. The following equations are used to convert the compression and decompression speeds into the encoding time e and decoding time d , given the compression ratio r : e=\frac{\text{size [bytes]}}{\text{CS [MB/s]}\times 1024\times 1024} (13) d=\frac{\text{size [bytes]}}{\text{DS[MB/s]}\times r\times 1024\times 1024}. (14) The results are presented in Table 5 . Fig. 4 illustrates the outcomes of applying the proposed approach to the data in Table 5 . Table 5 : Outcomes of text compressors on the Silesia compression corpus REFERENCELINK7 2024 Compressor ( e ) ( d ) ( r ) zstd 1.5.1 -1 0.0215 0.0023 2.887 zlib 1.2.11 -1 0.1198 0.0104 2.743 brotli 1.0.9 -0 0.0288 0.0094 2.702 zstd 1.5.1 --fast=1 0.019 0.0022 2.437 zstd 1.5.1 --fast=3 0.017 0.0023 2.239 quicklz 1.5.0 -1 0.0211 0.0067 2.238 zstd 1.5.1 --fast=4 0.016 0.0023 2.148 lzo1x 2.10 -1 0.0173 0.0064 2.106 lz4 1.9.3 0.0154 0.0012 2.101 lzf 3.6 -1 0.0278 0.0066 2.077 snappy 1.1.9 0.0207 0.0031 2.073 zstd 1.4.5 -1 0.0228 0.0024 2.884 zlib 1.2.11 -1 0.1265 0.0104 2.743 brotli 1.0.7 -0 0.0285 0.0094 2.703 zstd 1.4.5 --fast=1 0.02 0.0021 2.434 zstd 1.4.5 --fast=3 0.0178 0.0021 2.312 quicklz 1.5.0 -1 0.0203 0.0072 2.238 zstd 1.4.5 --fast=5 0.0163 0.0022 2.178 lzo1x 2.10 -1 0.0165 0.0066 2.106 lz4 1.9.2 0.0154 0.0012 2.101 lzf 3.6 -1 0.0278 0.0064 2.077 snappy 1.1.8 0.0203 0.0031 2.073 Figure 4 : Outcome of the proposed technique for the results in Table 5 From the results presented in Fig. 4 , it can be seen that LZ4 1.9.2 outperforms all other methods with percentages of 9.10%, 5.63%, 8.39%, and 7.73% for combinations of e and d , e and r , d and r , and all three parameters, respectively. Therefore, LZ4 1.9.2 is the optimal method for this dataset, regardless of how the compression criteria are combined. 5 Validation The purpose of this section is to validate the proposed method with evidence. To achieve this, five hypothetical text compressors (C), designated as C1 through C5, are considered. Tables 6 – 9 display the results with random values assigned to the encoding time e , decoding time d , and compression ratio r . Specifically, for the combinations e and d , e and r , d and r , and all three parameters, we deliberately select lower values for compressors C2, C3, C5, and C4, respectively, to evaluate the effectiveness of the proposed method. Table 6 : X1 Dataset C ( e ) ( d ) ( r ) C1 0.0727 0.0233 1.885 C2 0.0722 0.0227 4.739 C3 0.0751 0.0252 7.992 C4 0.1985 0.0603 9.334 C5 0.0823 0.0294 3.414 Table 7 : X2 Dataset C ( e ) d r C1 0.0727 0.0233 1.885 C2 0.0722 0.0227 4.739 C3 0.0711 0.0252 4.792 C4 0.1985 0.0603 4.334 C5 0.0823 0.0294 3.414 Table 8 : X3 Dataset C ( e ) ( d ) ( r ) C1 0.0727 0.0233 1.885 C2 0.0722 0.0227 4.739 C3 0.0711 0.0252 4.792 C4 0.1985 0.0603 4.334 C5 0.0823 0.0214 4.814 Table 9 : X4 Dataset C ( e ) ( d ) ( r ) C1 0.0727 0.0233 1.885 C2 0.0722 0.0227 4.739 C3 0.0711 0.0252 4.792 C4 0.0708 0.0203 4.834 C5 0.0823 0.0214 4.814 The results of our proposed strategy in Tables 6 – 9 are illustrated in Figs. 5 – 8 , which demonstrate that the most appropriate approaches are correctly identified. Therefore, we can conclude that our method effectively predicts the optimal compressor for any combination of e , d , and r . Figure 5 : Performance for the combination of e and d . Figure 6 : Performance for the combination of r and e . Figure 7 : Performance for the combination of d and r . Figure 8 : Performance for the combination of e , d , and r . 6 Conclusion The objective of this article is to introduce a method for identifying the most efficient lossless compression algorithm in a particular application. The effectiveness of a lossless compression algorithm relies on all parameters—compression ratio, encoding time, and decoding time—rather than any single parameter alone. Although prior research has predominantly evaluated algorithms on the basis of individual parameters, the performance in a given application typically depends on two or all of them. Consequently, selecting an optimal lossless data compression algorithm for a given set of application requirements is a challenging task. To address this challenge, we propose a model that predicts the optimal lossless data compression algorithm for any combination of these parameters and quantifies the overall performance of each compared algorithm as a percentage. Experimental findings confirm that the proposed model effectively predicts the optimal method across various parameter combinations. Furthermore, the results highlight that although learning-based methods offer high compression ratios, classical methods generally exhibit greater efficacy for lossless compression.