LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-15-2013, 03:31 PM   #1
gregmcc
Member
 
Registered: Mar 2007
Distribution: opensuse, ubuntu, debian
Posts: 43

Rep: Reputation: 1
Compression software


I've got a .img file that is 8GB. I've done a gzip and a tar.gz.

gzip compresses it down to 5.8GB and tar.gz down down to 6.1GB

If however I copy the file to windows and rar it, it comes down to 800MB!

I'd like to get those sort of compressions on Linux - would the only way to do this be using rar under linux? Is it possible - I see there is unrar under Opensuse but no rar?

Shouldn't gzip get similar compressions?
 
Old 02-15-2013, 03:37 PM   #2
gregmcc
Member
 
Registered: Mar 2007
Distribution: opensuse, ubuntu, debian
Posts: 43

Original Poster
Rep: Reputation: 1
Some more searching and I found the answer. rar for Linux

http://pkgs.org/opensuse-12.1/packma....i586.rpm.html
 
Old 02-15-2013, 05:03 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
There are many programs to compress data. Each one has advantages either in speed or the type of data.
 
Old 02-16-2013, 12:39 AM   #4
gregmcc
Member
 
Registered: Mar 2007
Distribution: opensuse, ubuntu, debian
Posts: 43

Original Poster
Rep: Reputation: 1
I've tried rar now - the compression is pretty misserable. rar's down to 5.6GB as well.

How come the windows version rar's it down to 800MB amd the linux version 5.8GB - thats a massive difference.

What is the best linux compression software for size - I'm not worried about speed.
 
Old 02-16-2013, 05:19 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I really doubt that you can get such a difference in compression rate when changing the OS, since the OS is not involved at all in the compression algorithm. Are you really sure that using the Windows version of rar results in a size of 800MB?
 
Old 02-16-2013, 07:40 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
The best general compression algorithm right now is LZMA2, and you can use 'xz' for it. You don't need to tar it first. You can also tweak the xz options to get even more compression.

If it is an iso image you can remove the error correction before compressing to possibly reduce size further:
http://www.neillcorlett.com/ecm
 
Old 02-16-2013, 08:06 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
gzip & bzip2 & xz all have an option to specify how much compression you want, on a scale of 1 - 9. Default is 6 eg http://linux.die.net/man/1/gzip.
 
Old 02-16-2013, 08:19 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
http://www.linuxlinks.com/article/20...sionTools.html

and

http://linuxaria.com/howto/linux-com...-bzip2?lang=en


Again it depends on type of data for most tools. Options exist for all of them too. Options may be as compression by number setting or other settings to make best use of your data. Two basic points are number of files and how large they are. Last may be type of data. All need to be considered when answering a question like "best".

Last edited by jefro; 02-16-2013 at 08:21 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compression help dimpu Linux - Newbie 10 09-29-2010 01:30 AM
Slax with SquashFS-4 new compression algorithm and layered compression ratios? lincaptainhenryjbrown Linux - Software 2 06-19-2009 05:29 PM
Compression une Linux - General 7 12-27-2007 04:20 PM
About compression on CD s26c.sayan Linux - Newbie 2 04-18-2007 04:27 PM
best compression drigz Linux - Software 2 06-05-2004 07:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration