Sponsored Content
Full Discussion: Tar gzip compression rate
Top Forums UNIX for Advanced & Expert Users Tar gzip compression rate Post 303038988 by gull04 on Thursday 19th of September 2019 02:47:08 AM
Old 09-19-2019
Hi,

The compression efficiency really depends on what is being compressed, in general high compression ratios of 90% plus seem to be available on large text files. But most compression utilities tend to give only a few percent when compressing binaries or populated database tables.

I dont think I've seen the 99.9% that you've achieved here, but I have seen 90% regularly on text files and I'm sure that on one occasion a few years ago an Oracle Database that I was migrating reduced by a huge amount just can't rmember by how much.

From the example above, I'm not sure how you compressed the file, are you sure that everything is there?

Regards

Gull04

Last edited by gull04; 09-19-2019 at 05:07 AM.. Reason: Correct Typo's
This User Gave Thanks to gull04 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

tar compression - please help

I'm backing up one of my sites, and will be moving to another host. This was an expermintal site, and many of the directories won't be needed. What tar command is needed to exclude directories from the compressed file? Could you also give an example. also this might be the same comand, but -... (4 Replies)
Discussion started by: Taylor
4 Replies

2. UNIX for Dummies Questions & Answers

can i tar and gzip in one liner ?

hello can i combine this 2 commands in one liner command? (1 Reply)
Discussion started by: umen
1 Replies

3. UNIX for Dummies Questions & Answers

TAR and GZIP help

Hi, There are 700 .pdf files in a certain directory on the server and I need to TAR them first and then compress them using GZIP to free up the space. The combined size of the .pdf files is 3gb. However, there is only 1gb of free space on the server. So as you can see when I try to TAR these... (3 Replies)
Discussion started by: VandeMatram
3 Replies

4. UNIX for Advanced & Expert Users

tar/gzip/gz...which one to use?

P0251WLADC.svm_wl1 > /svm_wl1/billing/data/server/archive/ALLEVT $ du -k FEB2006 22050224 FEB2006 As you can see,i have a folder called "FEB2006" which is around 22 GB. i guess zip or compress wont work...( i don know how do we compress a folder) i wished to use ""tar" ( i suppose... (5 Replies)
Discussion started by: abhijeetkul
5 Replies

5. UNIX for Dummies Questions & Answers

tar and gzip

Hi, I would like to have a combined gzip and tar that will compress and create multiple output tar.gz files. I want to have multiple files output because i cannot create an archive because there is no more space on my harddisk. I cannot transfer it locally because of slow connection. I want to... (3 Replies)
Discussion started by: tungaw2004
3 Replies

6. AIX

AIX 4.2: tar using compression ?

Hi, is there a way to use compression on the TAR command running on a AIX 4.2 ? I did a "man tar" but did not see mentions of using compression, nor how to even find out the tar version. I want to look into ways of reducing the amount of time to do backups. One backup is dumping database... (9 Replies)
Discussion started by: Browser_ice
9 Replies

7. AIX

GNU Tar with compression for AIX 4.2 already compiled ?

Is there a GNU Tar available with compression option available for AIX 4.2 that I can directly use (not having to compile anything, simple installation) ? (1 Reply)
Discussion started by: Browser_ice
1 Replies

8. UNIX and Linux Applications

Compression (gzip) for image analysis

Hi Everyone, I am a Ph.D student working on some image processing tasks and I have run into an interesting problem that I thought someone on here might have an idea about. This paper discusses a method to compare two images based upon the amount they can be compressed. Sorry, since this is my... (3 Replies)
Discussion started by: rudigarude
3 Replies

9. Shell Programming and Scripting

Adding gzip compression to a connection using nc

Hello everyone, As the title suggests, I am attempting to test adding gzip compression to a connection to an application I am testing. Currently I have the application set up with httptunnel, which forwards the connection to the remote host. I would like to use a script to intercept the... (5 Replies)
Discussion started by: haggismn
5 Replies

10. Shell Programming and Scripting

Show Percentage Compression in GZIP

Hi, I used gzip command to compress a huge tar file. But I saw that compression % was more than 100%. It might have inflated instead , probably because tar file is already packed properly. So I thought of unzippping it. Now after unzip I expected the tar file to be of less size than... (12 Replies)
Discussion started by: vinay4889
12 Replies
compress(1)						      General Commands Manual						       compress(1)

Name
       compress, uncompress, zcat - compress and expand data

Syntax
       compress [ -f ] [ -v ] [ -c ] [ -b bits ] [ name ...  ]
       uncompress [ -f ] [ -v ] [ -c ] [ name ...  ]
       zcat [ name ...	]

Description
       The  command reduces the size of the named files using adaptive Lempel-Ziv coding.  Whenever possible, each file is replaced by one
       with the extension .Z, while keeping the same ownership modes, access, and modification times.  If  no  files  are  specified,  the
       standard input is compressed to the standard output.  Compressed files can be restored to their original form using or

       The  -f	option	will  force  compression  of  name, even if it does not actually shrink name, or if the corresponding name .Z file
       already exists.	If the -f option is omitted, the user is asked whether an existing name.Z file should be  overwritten  (unless	is
       run in the background under

       The -c (cat) option makes compress/uncompress write to the standard output without changing any files.  Neither -c nor alter files.

       The  command  uses  the modified Lempel-Ziv algorithm.  Common substrings in the file are first replaced by 9-bit codes 257 and up.
       When code 512 is reached, the algorithm switches to 10-bit codes and continues to use more bits until the limit specified by the -b
       flag is reached (default 16).  The bits must be between 9 and 16.  The default can be changed in the source to allow to be run on a
       smaller machine.

       After the bits limit is attained, periodically checks the compression ratio.  If the ratio is  increasing,  continues  to  use  the
       existing  code  dictionary.   However,  if  the	compression ratio decreases, discards the table of substrings and rebuilds it from
       scratch.  This allows the algorithm to adapt to the next block of the file.

       Note that the -b flag is omitted for since the bits parameter specified during compression is encoded within the output along  with
       a number that ensures that neither decompression of random data nor recompression of compressed data is attempted.

       How much each file is compressed depends on the size of the input, the number of bits per code, and the distribution of common sub-
       strings.  Typically, text such as source code or English is reduced by 50-60%.  Compression is  generally  much	better	than  that
       achieved by Huffman coding or adaptive Huffman coding, and takes less time to compute.

       The -v option displays the percent reduction of each file.

       If  an  error  occurs,  exit  status is 1.  However, if the last file was not compressed because it became larger, the status is 2.
       Otherwise, the status is 0.

Options
       -f   Forces compression of name.

       -c   Makes compress/uncompress write to the standard output.

       -b   Specifies the allowable bits limit.  The default is 16.

       -v   Displays the percent reduction of each file.

Diagnostics
       Usage: compress [-fvc] [-b maxbits] [file ...]
       Invalid options were specified on the command line.

       Missing maxbits
       Maxbits must follow -b.

       file: not in compressed format
       The file specified to uncompress has not been compressed.

       file: compressed with xx bits, can only handle yy bits
       The file was compressed by a program that could deal with more bits than the compress code on this machine.   Recompress  the  file
       with smaller bits.

       file: already has .Z suffix -- no change
       The file is assumed to be compressed already.  Rename the file and try again.

       file already exists; do you wish to overwrite (y or n)?
       Type y if you want the output file to be replaced; type n if you do not.

       uncompress: corrupt input
       A SIGSEGV violation was detected which usually means that the input file is corrupted.

       Compression: xx.xx%
       Percent of the input saved by compression.  (For the -v option only.)

       -- not a regular file: unchanged
       If the input file is not a regular file (for example, a directory), it remains unchanged.

       -- has xx other links: unchanged
       The input file has links; it is left unchanged.	See for more information.

       -- file unchanged
       No savings is achieved by compression.  The input remains unchanged.

Restrictions
       Although compressed files are compatible between machines with large memory, -b12 should be used for file transfer to architectures
       with a small process data space (64KB or less).

								       RISC							       compress(1)
All times are GMT -4. The time now is 08:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy