Linuxreport
Linuxreport
2-Experiment Setup
All tests were conducted in a Kali Linux environment. The evaluation involved a single large test
file designed to simulate a common use case where file size and performance optimization are
critical. The results were collected by applying each compression tool and timing both
compression and decompression operations. Additionally, the compression ratios for each tool
were compared.
gzip:
Algorithm: DEFLATE (combining LZ77 and Huffman coding).
Characteristics: Moderate compression ratio, fast speed.
Best Use: General-purpose tasks.
xz:
Algorithm: LZMA2 (Lempel-Ziv-Markov chain algorithm).
Characteristics: Best compression ratio, slow speed.
Best Use: Minimizing file size for archival storage.
Course name : Linux System
zip:
Algorithm: DEFLATE.
Characteristics: Moderate compression ratio, can bundle multiple files.
Best Use: Project backups, document archives.
4-Experimental Procedure
a-Test File
b-bzip2
compression
decompression
Course name : Linux System
c-gzip
compression
decompression
d-xz
compression
decompression
Course name : Linux System
c-gzip
compression
decompression
5-Results
Tool Compression Time Decompression Time origenal size Compressed Size Compression Ratio
6-Analysis
Compression Time:
gzip is consistently the fastest in compressing the file, making it ideal for users who prioritize
speed over compression ratio.
xz takes the longest time due to the complexity of the LZMA2 algorithm but compensates with
a much better compression ratio.
bzip2 offers a good balance but is generally slower than gzip while achieving a higher
compression ratio.
Decompression Time:
gzip and zip decompress quickly, providing fast retrieval of the original file which is ideal for
scenarios where frequent access to the compressed data is needed.
xz, though providing an excellent compression ratio, is relatively slower in both compression
and decompression which may not be suitable for scenarios that require rapid data access.
Compression Ratio:
xz consistently outperforms the other tools in terms of compression ratio, making it ideal for
situations where minimizing file size is the priority.
bzip2 also provides a good compression ratio but is slower than xz.
gzip and zip offer more moderate compression ratios, balancing between speed and
efficiency.
7- Conclusion
Each compression tool has unique strengths and weaknesses depending on the requirements:
bzip2: Ideal for tasks where maximizing compression ratio is important but slower speeds are
acceptable.
gzip: The best all-around option providing a fast and reasonably efficient compression
solution for everyday use cases.
xz: Excellent for minimizing file size but at the expense of compression and decompression
speed. Best for tasks that prioritize file size over speed such as archival storage or software
packaging.
zip: Useful for bundling multiple files into a single compressed archive. While not the most
efficient in terms of compression ratio, its versatility makes it a good option for managing
complex file structures.