New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Switcher Hangout The place for switchers to discuss their new machines, and how to work with OS X. General support can be had here for newbie stuff, like "How do I restart my new iMac?" :)

Operation Mega-Compression


Post Reply New Thread Subscribe

 
Thread Tools
OnceYouGoMac

 
Member Since: Dec 28, 2009
Posts: 396
OnceYouGoMac is an unknown at this point
Mac Specs: Macbook Unibody 2.26 Dual, 2GB RAM, 250 GB HDD

OnceYouGoMac is offline
Compressing a compressed file does not, in fact, reduce its size lol. Save your money.
QUOTE Thanks
cwa107

 
cwa107's Avatar
 
Member Since: Dec 20, 2006
Location: Middletown, Pennsylvania
Posts: 26,583
cwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond repute
Mac Specs: 15" MBP, Core i7/2GHz, 8GB RAM, 480GB Crucial M500 SSD

cwa107 is offline
All digital data is comprised of basic elements (think binary, ones and zeros). When you run compression on it, you're basically applying an algorithm (a mathematical process) which finds synergies in the file and express the file in a different form. Then, when you uncompress the file, that same algorithm is essentially run in reverse to put the file back as it was. It's roughly analogous to using exponents to express a big number with a minimal amount of writing.

So, if you compress a compressed file, you're doing nothing as all of the efficiencies have already been exploited.

Liquid and computers don't mix. It might seem simple, but we see an incredible amount of people post here about spills. Keep drinks and other liquids away from your expensive electronics!
QUOTE Thanks
Nethfel

 
Member Since: Feb 25, 2009
Posts: 2,109
Nethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of light
Mac Specs: Late 2013 rMBP, i7, 750m gpu, OSX versions 10.9.3, 10.10

Nethfel is offline
It may be easier to see with a simple example - one type of compression (probably the easiest to understand, but only used for certain types of data) called RLE or Run Length Encoding would take something and compress it by values that are next to each other - basically if the file had a large sequence of a given value, it would reduce that sequence to a single representation of that value and a multiplier to let the decompression technology know how to rebuild the original file - so, for example if you had:
a file containing:

HHHHHHHHHBBBBBBBBBCCCCCCCCCEEEEDDDDDD

it would be compressed to:

9H9B9C4E6D

Which as you can tell, is a very small file as is compared to the original, it went from 37 bytes down to 10 bytes - a huge savings as the file is now less than 1/3 the original size. Now, let's say you could compress it again, using the same general method of encoding, you might end up with:

191H191B141E161D

I've now increased the file from 10 bytes long to 16 bytes long (since the numbers would be one value, and the letters would be another value and each would be a single "chain" of values).

As you can see, in this very simple and very impractical example, re-compressing a compressed file is inefficient and can cause you to end up with a file larger than the original.

As you can also see, a RLE compression or encoding of the data really reduces the file size when it comes to a file with large groups of same values next to each other.

One might ask why people distribute compressed files that aren't really compressed on the net? Well, for one reason, a lot of sites, email servers, etc. won't allow an executable to be sent - so putting it in a zip file fixes that issue. Another reason is if there are a group of compressed files that make up something - you might have another compressed file holding the group of compressed files (may seem like a waste of time, but it makes it easier for some places to do it that way then to re-pack a group of files)

So yes, ultimately, what you said - compressing a compressed file doesn't do anything - but could actually make matters worse. Compressing an uncompressed file tho, with an algorithm that fits the data, can greatly reduce the overall file size.

My Macs: Late 2013 rMBP w/ 750m; Mac mini G4, 1.25 GHz, 512m ram (server); Late 2011 11" MBA, 1.8GHz i7, 4Gig Ram, 256Gig SSD, HD3000; Powerbook 12" G4 1.33GHz running Debian as a server; Apple TV (1080p version)
QUOTE Thanks
technologist

 
Member Since: Mar 30, 2004
Location: USA
Posts: 4,744
technologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond repute
Mac Specs: 12" Apple PowerBook G4 (1.5GHz)

technologist is offline
I can't hope to match Nethfel's example, so let me offer a weak analogy instead.

If you have a trash compactor, you can compress several bags' worth of trash into one. But if you then take several loads worth of compacted trash and put them back into the compactor to compress them again, you won't get any additional reduction in size. Everything has already been crushed together as tight as the machine's maximum pressure will allow.

Or you may just burn out your compactor.

It's a weak analogy, but basically, there are limits...otherwise we'd just keep compressing the files until they took up no space at all.
QUOTE Thanks
Nethfel

 
Member Since: Feb 25, 2009
Posts: 2,109
Nethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of lightNethfel is a glorious beacon of light
Mac Specs: Late 2013 rMBP, i7, 750m gpu, OSX versions 10.9.3, 10.10

Nethfel is offline
Haha, thanks for the compliment - actually, I really like your description of the concept Technologist!

My Macs: Late 2013 rMBP w/ 750m; Mac mini G4, 1.25 GHz, 512m ram (server); Late 2011 11" MBA, 1.8GHz i7, 4Gig Ram, 256Gig SSD, HD3000; Powerbook 12" G4 1.33GHz running Debian as a server; Apple TV (1080p version)
QUOTE Thanks

Post Reply New Thread Subscribe


« name for hard drive icon | streaming video - windows media player »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Enable WindowBuffer Compression in Tiger? willwinuk OS X - Operating System 0 05-22-2009 03:22 PM
Power Adapter Operation - cut & swap the plug YaZ Apple Notebooks 1 01-09-2009 05:57 PM
Aperture 2.0, the Nikon D300 and RAW compression settings DarkDTSHD Images, Graphic Design, and Digital Photography 9 12-30-2008 08:08 PM
SMTP and PHP MrGecko Web Design and Hosting 0 02-08-2008 02:50 PM
Something to unlock or just delete 3 locked folders Lamboo OS X - Apps and Games 9 01-30-2008 03:49 PM

All times are GMT -4. The time now is 06:06 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?