Questions tagged [compression]

Compression is the process in which a file or folder's size is reduced by using an algorithm to encode the same information using fewer bits.

Many video and audio codecs use compression to save bandwidth. Also, compression can be used to help save disk space, such as by packaging files inside a tarball or .zip folder. Compressed data needs to be decompressed by the appropriate algorithm before it can be used.

For an in-depth look at what compression is, read more on Wikipedia.

221 questions
1050
votes
8 answers

What command do I need to unzip/extract a .tar.gz file?

I received a huge .tar.gz file from a client that contains about 800 mb of image files (when uncompressed.) Our hosting company's ftp is seriously slow, so extracting all the files locally and sending them up via ftp isn't practical. I was able to…
EmmyS
  • 14,720
  • 13
  • 39
  • 51
942
votes
12 answers

How do I uncompress a tarball that uses .xz?

I'm used to extracting tarballs with a -xfz flag, which handles gzip and bzip2 archives. Recently I've run into a .tar.xz file and I would like to uncompress it in one step using tar, how can I do that?
Jorge Castro
  • 69,284
  • 123
  • 459
  • 651
676
votes
24 answers

How can I reduce the file size of a scanned PDF file?

I have a 72.9MB PDF file that I need to shrink into under 500KB. The file was a JPEG image that I had scanned, and then converted to pdf.
tamimym
  • 6,899
  • 3
  • 15
  • 8
223
votes
3 answers

How do I compress a directory?

I'm trying to compress a directory and ftp it to a windows ftp. I have tried every tar command I can find to compress a directory. It appears to be ok. Then I transfer it and view it's contents using Winrar. Winrar keeps telling me the file is…
dko
  • 2,423
  • 2
  • 18
  • 15
191
votes
7 answers

What's the difference between .tar.gz and .gz, or .tar.7z and .7z?

Recently, I've been backing up a lot of my data, and I noticed that I can save files as .gz or .tar.gz, or .7z and .tar.7z, etcetera. What are the differences between the normal one and the .tar.* variant? Which one of them is adviced when making…
Exeleration-G
  • 7,355
  • 14
  • 57
  • 95
134
votes
7 answers

What's the easiest way to unrar a file?

I just realized I can't unrar .rar files on my Ubuntu machine! What's the easiest way to accomplish this fundamental task? If possible I'd love something like 7Zip that I can just right Click, and extract and have the program worry about how to do…
Only Bolivian Here
  • 7,787
  • 8
  • 22
  • 27
123
votes
3 answers

how to extract tar.7z files from command line?

Is there a way to extract files of tar.7z format using command line tools in Ubuntu?
pacodelumberg
  • 1,375
  • 2
  • 10
  • 7
91
votes
2 answers

Compressing folders with password via command line

I would like to know whether it is possible to do the following via CLI. I have a Folder F which contains several sub folders and some files. I want to compress folder F into .zip file with the "password-only-extract".
UnderDog
  • 1,749
  • 3
  • 17
  • 16
73
votes
5 answers

How to reduce the size of a pdf file?

I'm looking for a way in Ubuntu to reduce the size of a pdf (by reducing the quality of the images). I know that this can be done in Ghostscript by typing the following command in terminal: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4…
Nicole
  • 831
  • 1
  • 7
  • 4
72
votes
9 answers

Multi-Core Compression tools

What compression tools are available in Ubuntu that can benefit from a multi-core CPU.
Luis Alvarado
  • 204,136
  • 163
  • 532
  • 701
71
votes
2 answers

Compress in .tgz

I want to compress files in .tgz. I know how to make tar.gz(with tar and gzip) and some people say it is almost the same, but I need to make a .tgz, how??
RocketMan
  • 981
  • 2
  • 7
  • 7
69
votes
7 answers

Zip an archive without including parent directory

I want to zip many folders in a directory tree like so V- something.txt folder folder g.jpg h.jar When I try to zip it, it ends creating a zip archive with the v folder instead of the contents of it (the sub directories and files) How can I…
Dami
  • 841
  • 1
  • 6
  • 10
57
votes
3 answers

Best compression method?

I want to compress a 16GB folder, but what's the best method? tar.gz? tar.bz2 rar? 7z? Would the archive be smaller if I first compressed in a method, then copy the compressed archive to a new folder, then re-compressed in some other method? I need…
Amanda
  • 957
  • 1
  • 10
  • 13
32
votes
4 answers

Should I use xz or lzma compression?

I was wondering since in Ubuntu 10.10 I have the ability to create both xz and lzma archives. Should I switch to xz? http://en.wikipedia.org/wiki/Xz http://en.wikipedia.org/wiki/Lzma
NightwishFan
  • 3,636
  • 1
  • 23
  • 24
32
votes
5 answers

Will btrfs automatically compress existing files when compression is enabled?

I chose btrfs as the format of my / filesystem in the Ubuntu 12.04 LTS installer. After the installation completed, I added compress=lzo to the mount options in /etc/fstab and rebooted. Will the existing files be automatically compressed now, or…
ændrük
  • 74,042
  • 71
  • 228
  • 362
1
2 3
14 15