1829103 Members
2945 Online
109986 Solutions
New Discussion

Compression of Big files

 
SOLVED
Go to solution
Vibhor Kumar Agarwal
Esteemed Contributor

Compression of Big files

Hi,

I have a 3 GB and bigger tar files.

What are the ways of compressing it.
While using gzip it says, file too large.
Vibhor Kumar Agarwal
20 REPLIES 20
Muthukumar_5
Honored Contributor

Re: Compression of Big files

You can use bzip2 for this purpose.

Refer this: http://www.digistar.com/bzip2/

hth.
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: Compression of Big files

1) You can try with bzip2
2) Compress the file in a location where you have free space more than 3 GB.
3) Use gzip -9 (Better compression,bit slow)

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Compression of Big files

I'll try bzip2 for this.

gzip -9 gives the same output.

This time i have copied it.
"Value too large for defined data type"
Vibhor Kumar Agarwal
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Compression of Big files

No I can't bzip2.

Because i have to deliver this to different locations, and they won't install that.
Vibhor Kumar Agarwal
VEL_1
Valued Contributor

Re: Compression of Big files

Hi,

Which file system are u using? And OS?

Arunvijai_4
Honored Contributor

Re: Compression of Big files

I think, you need to compile gzip to enable large file compression.

http://www.brandonhutchinson.com/gzip__Value_too_large_for_defined_data_type.html
"A ship in the harbor is safe, but that is not what ships are built for"
Arunvijai_4
Honored Contributor

Re: Compression of Big files

One more link, http://www.gzip.org/#faq10
"A ship in the harbor is safe, but that is not what ships are built for"
VEL_1
Valued Contributor
Solution

Re: Compression of Big files


Alternatively, you can try to use the dd command:

Please see the following link:

http://wdb1.sco.com/kb/showta?taid=112962


Note:

If you used old version of gzip, its better to upgrade gzip. Because old version of gzip may not support the large files.

Vibhor Kumar Agarwal
Esteemed Contributor

Re: Compression of Big files

Just a small problem:

I am not an administrator, so don't have enough rights to do the installation.
Vibhor Kumar Agarwal
HugoAlmeida
Trusted Contributor

Re: Compression of Big files

Hi

Try
compress -fv

HTH
Arunvijai_4
Honored Contributor

Re: Compression of Big files

Can you compile gzip yourself on your server ? Do you have enough permission to do that ?
In such cases, you can build your own gzip and use it for compression.
"A ship in the harbor is safe, but that is not what ships are built for"
Alessandro Pilati
Esteemed Contributor

Re: Compression of Big files

Download gzip here and recompile it http://hpux.connect.org.uk/hppd/hpux/Gnu/gzip-1.3.5/
without restrictions

or
download this package:
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1123

regards,
Alex
if you don't try, you'll never know if you are able to
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Compression of Big files

Compressing is working, but its too slow and also it doesn't give a good compression ratio.

Compiling gzip by myself will end up in the same problem, when i deliver the file, the reciepient might not be able to decompress it.
Vibhor Kumar Agarwal
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Compression of Big files

Hey,

That dd option seems to work. :-)
I just replaced compress with gzip and is working.
Will take some time to complete, will update you then.
Vibhor Kumar Agarwal
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Compression of Big files

Wow,

That dd worked wonderfully.

At the end of dd it gave me the output:
300+1 records in
300+1 records out
0+52264 records in
0+52264 records out

What does it mean.
Vibhor Kumar Agarwal
Fabio Ettore
Honored Contributor

Re: Compression of Big files

Hi,

what dd command did you launch exactly which got that output?

Best regards,
Fabio

WISH? IMPROVEMENT!
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Compression of Big files

Check out the raj's link.
Vibhor Kumar Agarwal
Michael Roberts_3
Honored Contributor

Re: Compression of Big files

cat bigFile | gzip -c - | cat - > bigFile.gz

'cat' is OK with large files and since 'gzip' is reading/writing a pipe stream it doesn't have to deal with a large file descriptor.
etouq ot hguone revelc ton m'i
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Compression of Big files

Its not a file, its a whole directory structure tarred up.

Will it work.
Vibhor Kumar Agarwal
A. Clay Stephenson
Acclaimed Contributor

Re: Compression of Big files

If it's tar'ed up; it's still a file (commonly called a "tarball") so that it will still work. Alternately you can pipe the output of tar to another utility like compress.
If it ain't broke, I can fix that.