Skip to main content

Questions tagged [compression]

Compression decreases the size of data.

Filter by
Sorted by
Tagged with
535 votes
6 answers
1.3m views

How to decompress a .bz2 file

I have a file as: filename.bz2 I need to decompress. I have tried the command: tar xvjf filename.tar.bz2, but it didn't work as the file is not a tar file. How do I decompress this file?
Jury A's user avatar
  • 5,495
331 votes
9 answers
635k views

How can I extract .rar files on the Mac?

How can I extract RAR files in macOS? The built-in Archive Utility only supports ZIP. Is there anything else, built-in or third-party, that also supports RAR? I don't mind whether it's Terminal-only ...
Paul D. Waite's user avatar
253 votes
16 answers
545k views

How do I extract files from an MSI package?

We have some old patches that we want to get the files from but don't wish to spend the time installing them to a machine. Can anyone advise a way to extract files from an MSI installation package?
Martin's user avatar
  • 4,244
244 votes
3 answers
60k views

Why are tar.xz files 15x smaller when using Python's tar library compared to macOS tar?

Context I'm compressing ~1.3 GB folders each filled with 1440 JSON files and find that there's a 15-fold difference between using the tar command and Python's built-in tarfile library on macOS or ...
Saaru Lindestøkke's user avatar
228 votes
6 answers
285k views

How to specify level of compression when using tar -zcvf?

I gzip directories very often at work. What I normally do is tar -zcvf file.tar.gz /path/to/directory Is there a way to specify the compression level here? I want to use the best compression ...
Lazer's user avatar
  • 17.8k
192 votes
5 answers
316k views

Compress files from OS X terminal?

In the Finder, there is this wonderful ability to right click on a file or directory, select compress from the drop-down, and end up with a zipped file. Is it possible to do the same thing from the ...
William Jockusch's user avatar
176 votes
8 answers
63k views

How is PNG lossless given that it has a compression parameter?

PNG files are said to use lossless compression. However, whenever I am in an image editor, such as GIMP and try to save an image as a PNG file, it asks for the compression parameter, which ranges ...
pkout's user avatar
  • 1,911
157 votes
7 answers
125k views

Pros and cons of bzip vs gzip?

I've known gzip for years, recently I saw bzip being used at work. Are they basically equivalent, or are there significant pros and cons to one of them over the other?
ripper234's user avatar
  • 11.6k
135 votes
1 answer
124k views

Cannot decompress .tar.xz file, getting "xz: Cannot exec: No such file or directory" from tar

Per How do I uncompress a tarball that uses .xz?, I tried tar xf php-5.6.0RC4.tar.xz and tar -xJf php-5.6.0RC4.tar.xz and in both cases I get the following: tar (child): xz: Cannot exec: No such file ...
neubert's user avatar
  • 7,204
124 votes
4 answers
215k views

Creating an archive from a directory without the directory name being added to the archive

I have the following folder structure: root folder1 folder2 folder3 7za.exe I want to run the 7-zip command line tool to compress all the files in folder1 to a zip file ...
gg.'s user avatar
  • 1,343
120 votes
6 answers
382k views

What are the best options to use when compressing files using 7 Zip?

I often have to gather log files and upload them to a central server (Owned by another company). The central server has a size limit of the file, so I am trying to create the smallest file possible ...
jjnguy's user avatar
  • 1,857
110 votes
5 answers
304k views

Create a tar file for compressing files and directories on Mac OS X

I'm new to Mac OS X and am not sure how to do this: I have three directories. I want to create a tar/zip file of them so that I can attach them to an email. Any ideas?
sagarkothari's user avatar
  • 5,015
109 votes
4 answers
233k views

How to obtain maximum compression with .tar.gz? [duplicate]

The way i understand the use of tar + gzip is that tar is normally used to consolidate a grouping of files into a single file, then gzip is used to compress that file. I recently learned that tar can ...
Mario Zigliotto's user avatar
93 votes
6 answers
246k views

Command to 'gzip' a folder?

I am new to Mac command prompt stuff. How do you create a gzip of a folder in Mac OS X? I was told by a few folks that if you want to create a gzip of a folder you should 'tar' it first and then 'gzip'...
thndrkiss's user avatar
  • 1,073
91 votes
21 answers
159k views

Compressing with RAR vs ZIP [closed]

A lot of people are compressing files with RAR, sending compressed files with RAR and so on. ZIP is more standard and works on all platforms. Windows users have ZIP included and Linux users have no ...
90 votes
7 answers
42k views

Compress and then encrypt, or vice-versa?

I am writing a VPN system which encrypts (AES256) its traffic across the net (Why write my own when there are 1,000,001 others already out there? Well, mine is a special one for a specific task that ...
Majenko's user avatar
  • 32.6k
87 votes
11 answers
11k views

Can zipping a file break it?

I just asked someone to send me a zipped psd file. They declined, citing that zipping a file can break the fonts. I assumed zipping a file is perfectly reversible, hence why it is commonly used. I ...
alex's user avatar
  • 4,362
85 votes
5 answers
280k views

Different compression methods in 7zip: Which is best suited for what task?

So there are different compression methods in 7zip. Which method is best suited for what task? For example: One difference between LZMA and LZMA2 is I can choose all my cpu cores, whereas in LZMA 2 ...
Grumpy ol' Bear's user avatar
78 votes
7 answers
72k views

How does NTFS compression affect performance?

I've heard that NTFS compression can reduce performance due to extra CPU usage, but I've read reports that it may actually increase performance because of reduced disk reads. How exactly does NTFS ...
bwDraco's user avatar
  • 46.2k
77 votes
10 answers
82k views

Compressing folders on a mac, without the .DS_Store

Is there anyway to get rid of the .DS_Store when compressing a folder on a mac? I work on a mac and send work to clients in zip format, but always get questioned on the .DS_Store folder inside them. ...
danixd's user avatar
  • 1,504
72 votes
2 answers
50k views

Optimize animated GIF size in command-line

How to compress GIF animations? For example by reducing the color index. The files are generated using Imagemagick but optimization seems complicated. For example, the following animation is 864KB ...
qubodup's user avatar
  • 8,984
68 votes
3 answers
72k views

Why does preset "veryfast" in FFmpeg generate the most compressed file compared to all other presets?

The FFmpeg wiki says that the best compression rate is by preset "veryslow". But when I am trying it with my video then preset veryfast provides the best compression in my case. The following is the ...
Faisal's user avatar
  • 791
64 votes
7 answers
196k views

What is the maximum compression ratio of gzip?

What is the largest size a gzip (say 10kb for the sake of an example) can be decompressed to?
Zombies's user avatar
  • 3,892
63 votes
2 answers
138k views

How does 'dictionary size' affect compression?

I know that higher size may lead to better compression ratio and vice verca. But is there a way I can decide better?.. since there are so many choices So far I've noticed dictionary size ≈ file size ...
laggingreflex's user avatar
56 votes
8 answers
76k views

.tar files without directory structure

I'm .taring some files with the path example/super_user/Output.*. The resulting .tar looks like this: + example + super_user - Output.zip - Output.xml - Output.txt ...
user avatar
55 votes
8 answers
90k views

Zip files without compression

I'd like to bundle a number of big files into a single file, to make them easier to share. The files are already compressed (eg. jpeg, video etc), so I don't need compression, only archiving. How can ...
Colonel Panic's user avatar
52 votes
5 answers
108k views

Is it possible to execute a file after extraction from a 7-Zip self-extracting archive (SFX) archive?

I'm try to make a compressed deploy-able application. Currently I'm taking a set of files that I've published from my IDE (Visual Studio 2008 - WPF published application) and compressing ...
Mike G's user avatar
  • 623
50 votes
7 answers
182k views

How to make 7-Zip faster

I normally use WinRAR over 7-Zip simply because it's faster and only a little less efficient with compression. I did a few tests on different file types and sizes comparing the 7-Zip and WinRAR ...
Kefka's user avatar
  • 1,446
45 votes
2 answers
23k views

Is there a way to determine the decompressed size of a .bz2 file?

Is there a way to print the decompressed size of a .bz2 file without actually decompressing the entire thing?
endolith's user avatar
  • 7,561
44 votes
3 answers
153k views

How to set password on already existing winrar archive and encrypt it also?

Not when creating new archive, but on existing archive. I would also like to know how to do that in other archiver.
Boris_yo's user avatar
  • 5,884
44 votes
1 answer
193k views

Extracting a tar.gz file returns, “This does not look like a tar archive.”

I have a tar.gz file and I want to extract it using terminal. I used following commands: tar tvzf ldtp_3.5.0.orig.tar.gz and tar -xvzf ldtp_3.5.0.orig.tar.gz. However, I get the same result for both ...
TheRookierLearner's user avatar
42 votes
3 answers
69k views

How do I use 7-Zip CLI for Windows to create .tar.gz archives?

How can I use the 7-Zip CLI (7za.exe) on Windows to create .tgz archives, as I use tar zcvf archive.tgz source_files on Linux?
f.ardelian's user avatar
41 votes
3 answers
78k views

How to do "Files to store without compression" in 7-zip?

Is there any way to selectively prevent certain file types from compression in 7-zip, like in WinRAR? I'm trying to compress a huge folder (many gigabytes), and I don't want the already-compressed ...
user541686's user avatar
  • 23.7k
40 votes
4 answers
69k views

What is the cause of a high CPU usage of 'system and compressed memory' in Windows 10?

There is an observation to be made for Windows 10 on my laptop running with 24G memory available, and 2.5G used. There is no 'memory pressure'. Other questions have looked at memory consumption (...
Raymond Burkholder's user avatar
38 votes
5 answers
21k views

Why is a 7zipped file larger than the raw file? [duplicate]

Possible Duplicate: Why doesn't ZIP Compression compress anything? I tried 7zipping an .exe file but it actually became larger. Is this the expected result?
IMB's user avatar
  • 5,533
34 votes
5 answers
65k views

Can Double Zipping Cause Problems?

I have a directory that I have been storing a ton of files in. Among the 10ish types of files there are also .zips of other directories. In my personal experience I vaguely remember issues when ...
sealz's user avatar
  • 2,324
34 votes
6 answers
85k views

How can I achieve the best, standard ZIP compression?

I don't care how long it takes to compress, all I want to achieve is two things: The absolute best possible compression ratio Compatibility with standard readers, such as Windows and WinZip So ...
34 votes
5 answers
188k views

What if I checked the box "Compress this drive to save disk space" on an SSD?

I was wondering how it would effect an SSD if this was checked: I was just curious whether it would save my SSD disk space?
Muhammad Sholihin's user avatar
33 votes
1 answer
5k views

7-Zip seems unable to compress zero-filled virtual disk image after 1.8 GB

I am trying to compress a virtual disk image that is mostly empty. It has about 2 GB used out of 13.5, but even after zero filling the empty space, I am still only able to compress it to around ...
Tom's user avatar
  • 831
33 votes
5 answers
40k views

Between xz, gzip, and bzip2, which compression algorithim is the most efficient?

Between xz, gzip, and bzip2, which compression algorithm gives the smallest file size and fastest speed when compressing fairly large tarballs?
Nathan2055's user avatar
  • 1,270
32 votes
6 answers
10k views

Why doesn't Gzip compression eliminate duplicate chunks of data?

I just did a little experiment where I created a tar archive with duplicate files to see if it would be compressed, to my awe, it was not! Details follow (results indented for reading pleasure): $ dd ...
Guido's user avatar
  • 354
30 votes
2 answers
4k views

Compressing many similar large images?

I'm dealing with a large archive of satellite images of the Earth, each one taken 15 minutes apart over the same area, therefore they are quite similar to each other. Two contiguous ones look like ...
Camilo Rada's user avatar
29 votes
3 answers
155k views

How to extract a gpg file

I have a file that is compressed. I used a program to find out what kind of file it is and it says that it's a gpg file. How do you uncompress a gpg file?
Phenom's user avatar
  • 6,657
29 votes
2 answers
84k views

What is the difference between rar and RAR5 compression?

What is the difference between rar and RAR5 compression ? Which is better for which purpose vs the compression time.
Abhishek Jain's user avatar
29 votes
4 answers
67k views

7-Zip compression on multi-core computers

Does 7-Zip take advantage of multiprocessor or multi-core systems when compressing? For example, would there be a close to 16 times speed-up on a 16 core system assuming no disk or memory bottlenecks?...
Peter Mortensen's user avatar
28 votes
8 answers
48k views

Is it possible to open a self-extracting compressed Windows file on a Mac?

If I have a compressed file that's stored as a self-extracting archive for Windows, i.e., a .exe file, is it possible to convert it to a zip file that can be unzipped under OS X? Alternatively, is ...
abeger's user avatar
  • 795
28 votes
6 answers
42k views

Multithreaded support in 7za

(I posted this first on serverfault, but then I realized it probably belongs here.) I'm trying compress a very large text file using 7za (p7zip) 9.20. The -mmt option doesn't seem to have any effect. ...
Brian L's user avatar
  • 383
28 votes
3 answers
48k views

FFMPEG / libx264: How to specify a variable frame rate but with a maximum?

Instead of providing a fixed frame rate to FFMPEG/libx264 (-r/-framerate), I would like to specify a variable frame rate with a MAXIMUM value, and allow libx264 to down the frame rate as it sees fit. ...
Mark Gerolimatos's user avatar
27 votes
6 answers
32k views

How to unpack a chrome theme?

How to unpack a packed chrome theme(*.crx)? Their FAQ states how to pack, but not how to unpack.
aviraldg's user avatar
  • 2,449
27 votes
6 answers
9k views

How can I evaluate the best choice of archive format for compressing files?

In general, I've observed the following: Linux-y files or tools use bzip2 or gzip for distributing archives Windows-y files or tools use ZIP for distributing archives Many people use 7-Zip for ...
user541686's user avatar
  • 23.7k

1
2 3 4 5
25