Comparative Study of Data Compression Algorithms: Zstandard, zlib & LZ4
摘要
Data compression continues to grow more important in the era of rapid communication and transfer of data. Compression algorithms allow this to happen, but many different options are available. This comparative study investigates three lossless compression algorithms: Zstandard, zlib, and LZ4. This study has a unique aim to provide insight into the performance of each algorithm to identify their strengths and weaknesses in different applications. Previous studies have been done; however, this study evaluates the latest modern options for lossless compression algorithms with a larger variety of data types and measured benchmarks. The algorithms are tested with a corpus consisting of different files; text-based, image, PDF, CSV, and JSON. The tests are done a set number of times, and the average is taken to increase reliability. The benchmarks used to evaluate the algorithms are the compression ratio, size savings, compression speed, decompression speed, and respective space complexities. Through these values, it was found that zlib had the highest compression ratios, despite its generally slower compression speed. Zstandard’s compression ratios and size savings are slightly below zlib, however, it has higher speeds. LZ4 has the worst compression ratios out of the three but has the highest speeds due to its low overhead, making it suitable for small microprocessors. Each algorithm has its strengths and weaknesses, but zlib had the best overall performance in this study. Further research can be done to improve the generalizability and reliability of the findings.