![]() ![]() However, it's not widely supported for plain file compression, so it may not be a viable option for your usage. It's part of the HTTP/2 standard, and is specifically optimized for streaming, and can actually get both better compression ratios and performance than DEFLATE-based options do. It's been slowly supplanting LZO, as most of the stuff that used LZO used it for speed.īrotli is another new one from Google. LZ4 is a newer standard developed by Google that runs insanely fast (near memory bandwidth speed for decompression), but gets even worse compression ratios than LZO. Just like Gzip, it's not widely used anymore, as people tend to favor alternatives that either give a better compression ratio, or better performance. LZOP uses the LZO algorithm, and generally compresses worse than DEFLATE, but works much faster. 7zip also uses LZMA, but without the data transformations, so it's often not quite as good in terms of ratios as XZ. The cost of this however, is that it takes a long time to compress data. In addition to LZMA, it does some transformations that make it a bit better at compressing executables than the other options. Like the LZW algorithm that DEFLATE is derived from, LZMA is ultimately derived from an algorithm known as LZ77, though it gets insanely better compression ratios than DEFLATE-based options, and significantly better ratios than Bzip2 in most cases. XZ uses a different algorithm called LZMA. Because of some assumptions made in how it transforms the input data prior to Huffman coding, it is also somewhat more sensitive than many other options to how the input data is structured. In most cases, it compresses better than DEFLATE-based compressors, but it's slower than DEFLATE too. ![]() Pretty much anything based on DEFLATE (or LZW in general) isn't going to win in any respect when comparing compression algorithms.īzip2 by contrast does some complex transformations on the data to make it compress more efficiently, and then uses Huffman coding for the actual compression. Outside of usage as a component of other file formats (such as ZIP), it's not very widely used for storage anymore. DEFLATE is not a particularly great compression algorithm, but it's ubiquitous (there are even hardware implementations of it), so it's often used as a standard of comparison. ZIP and Gzip show very similar results in this case because they use variants of the same compression algorithm, more specifically a derivative of the LZW algorithm known as DEFLATE. Now, while I can't give a conclusive answer without lots of further details, I can however give you some general advice on file compression: The processes it uses for this are actually somewhat complicated (too complicated to explain here), but because of the constraint that it doesn't lower perceived quality, combined with the fact that it compresses frame-by-frame instead of as a single long stream, there's sometimes significant room for improvement (as you can see from your test). This is because MP4 itself includes data compression, in this case optimized for compressing audio and video data without significantly lowering the perceived quality. Your results will vary widely depending on the exact specifics of the MP4 encoding used. Now, with that out of the way, let's move on to your main question: Some formats, such as ZIP, 7z, or RAR, combine archiving and compression (although ZIP can store files uncompressed as well). Some of them (such as Gzip and LZ4) may support compressing multiple files and concatenating them into one file that can then be uncompressed into the multiple original files (which is what's happening when you gzip a directory), but they don't' store paths or other metadata, so they are not archive formats. Gzip, Bzip2, Brotli, LZ4, LZOP, XZ, PAQ, and Zstandard are all compression formats. Tar is an example of a pure archive format, it does no inherent compression,Ī compresion format just compresses data, but does not inherently combine multiple files into one. To be a bit more specific:Īn archive format aggregates multiple files and/or directories, usually including metadata such as ownership, timestamps, and possibly other data, into a single file. Gzip and Bzip2 are compression formats, not archive formats. First, a minor aside about terminology: ZIP is the only archive format you used. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |