Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tplatt

macrumors newbie
Aug 30, 2009
19
0
Try this command instead:
Code:
gcc -arch x86_64 -arch i386 -lz -o afsctool afsctool.c

I was able to get it to compile in XCode by adding frameworks: CoreFoundation, CoreServices, and libz.dylib.

Does that sound right? I guess it is, because it works :)
 

brkirch

macrumors regular
Original poster
Oct 18, 2001
191
1
I've setup a website for updates:
http://web.me.com/brkirch

I was able to get it to compile in XCode by adding frameworks: CoreFoundation, CoreServices, and libz.dylib.

Does that sound right? I guess it is, because it works :)
That works, although you actually don't need CoreFoundation to be linked in, only CoreServices and libz. To compile through the Terminal try
Code:
gcc -arch x86_64 -arch i386 -lz -o afsctool afsctool.c -framework CoreServices
The CoreServices framework didn't use to need to be linked in, which is why I didn't include it in my previous post.
 

Jakimo

macrumors 6502
Apr 25, 2008
464
92
Colorado Springs
Squeeze - GUI for HFS+ compression

Check out MacHeist.com this week for a free copy of Squeeze, a utility that does this via a Preference Panel.
 

andi242

macrumors member
Jan 27, 2009
55
1
Check out MacHeist.com this week for a free copy of Squeeze, a utility that does this via a Preference Panel.

this only works for the system partition.
if you do store your system on a single partition, you're fine.
if you have stored files on a second partition Squeeze won't work.
external drives neither...

the developers may to lift this restriction in later releases, support told me.

besides... Squeeze seems to work as a service noticing changes within folders while afsctool is static
 

CPngN

macrumors newbie
Jun 9, 2008
16
12
Bay Area, California
the developers may to lift this restriction in later releases, support told me.

besides... Squeeze seems to work as a service noticing changes within folders while afsctool is static

I assume that if you stop the service, it simply doesn't monitor those folders to compresss any new data. So if you turn off the service after you compress a few folders, it should be the same effect as running afsctool, no?

I ran my docs and movies and a few other folders through there and saved 4.x gigs - enough to store an additional DVD ISO. Not bad if it doesn't eat up too many resources after the initial compression effort.
 

Tu13es

macrumors regular
Sep 28, 2009
161
0
Code:
     --hfsCompression
                   When copying files or extracting content from an archive,
                   if the destination is an HFS+ volume that supports compres-
                   sion, all the content will be compressed if appropriate.
                   This is only supported on Mac OS X 10.6 or later, and is
                   [B]only intended to be used in installation and backup scenar-
                   ios that involve system files[/B]. Since files using HFS+ com-
                   pression are not readable on versions of Mac OS X earlier
                   than 10.6, this flag should not be used when dealing with
                   non-system files or other user-generated content.

I stumbled onto this after finding Squeeze. I'm curious as to why the bolded section is there and whether or not using Squeeze will be worth it or not.
 

lns-pedro

macrumors newbie
Mar 8, 2010
3
0
Code:
     --hfsCompression
                   When copying files or extracting content from an archive,
                   if the destination is an HFS+ volume that supports compres-
                   sion, all the content will be compressed if appropriate.
                   This is only supported on Mac OS X 10.6 or later, and is
                   [B]only intended to be used in installation and backup scenar-
                   ios that involve system files[/B]. Since files using HFS+ com-
                   pression are not readable on versions of Mac OS X earlier
                   than 10.6, this flag should not be used when dealing with
                   non-system files or other user-generated content.

I stumbled onto this after finding Squeeze. I'm curious as to why the bolded section is there and whether or not using Squeeze will be worth it or not.

I believe that message appears for compatibility reasons, as explained in the next sentence in your quote (i.e., compressed files can only be read in Snow Leopard systems). Copying a file to other location, or sharing it from your computer works correctly, so the caveat is there for volumes you use alternatively in several operating systems.
 

lns-pedro

macrumors newbie
Mar 8, 2010
3
0
this only works for the system partition.
if you do store your system on a single partition, you're fine.
if you have stored files on a second partition Squeeze won't work.
external drives neither...

the developers may to lift this restriction in later releases, support told me.

Squeeze 1.1 now allows folders in non-boot volumes to be compressed, as long as they are not located in removable media. Please, upgrade to the latest release :)

The reasons for still excluding removable media are:
- If you mount a volume in an OS other than Snow Leopard, compressed files cannot be read. We prefer to exclude those volumes rather than cause any inconvenience to users that might not be aware of this limitation. Note, however, that copying a file to any location or sharing it from your Snow Leopard computer will work correctly in all cases.
- Squeeze being configured to receive filesystem notifications from a folder in removable media would prevent the volume from being ejected while Squeeze is running. Again, this would potentially be the cause of frustration for some users.

We are looking at ways to further relax the non-boot volume restriction. However, Squeeze 1.1 allowing internal disks to be processed does help with a lot of configurations.
 

lns-pedro

macrumors newbie
Mar 8, 2010
3
0
I assume that if you stop the service, it simply doesn't monitor those folders to compresss any new data. So if you turn off the service after you compress a few folders, it should be the same effect as running afsctool, no?

That's correct :)

Using as a background service is intended to keep some folders compressed, which is most useful in locations where reading is much more frequent than writing. For example, pointing Squeeze at your applications folder will ensure that any new application you install will be automatically compressed.

I ran my docs and movies and a few other folders through there and saved 4.x gigs - enough to store an additional DVD ISO. Not bad if it doesn't eat up too many resources after the initial compression effort.

After the initial compression has taken place, Squeeze will sit there and will only wake up when changes occur in the configured folders. When that happens, Squeeze will only perform compression if your system CPU and disk activity levels are below a certain threshold, so it should not interfere with the rest of your activities.

Nice savings! :)
 

mckyvlle

macrumors 6502a
Nov 21, 2007
575
5
London, UK
Ooh, I'm rather late to this game...

To those that have used HFS+ compression extensively/on a daily basis, any pros/cons/caveats to be aware of? Does running compression do anything negative to data integrity?
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
Ooh, I'm rather late to this game...

To those that have used HFS+ compression extensively/on a daily basis, any pros/cons/caveats to be aware of? Does running compression do anything negative to data integrity?

Don't do it. All the really space consuming items on your hard drive are already compressed, and HFS+ compression won't help (videos, music and photos). HFS+ compression is excellent for Apple's applications that contain everything needed for 20 different languages inside, and for most users 19 languages will be compressed at all times.
 

Detrius

macrumors 68000
Sep 10, 2008
1,623
19
Apex, NC
Don't do it. All the really space consuming items on your hard drive are already compressed, and HFS+ compression won't help (videos, music and photos). HFS+ compression is excellent for Apple's applications that contain everything needed for 20 different languages inside, and for most users 19 languages will be compressed at all times.

I can't agree with this blanket response. There are situations where it would be beneficial. For example: if you use MacPorts or Fink, you can use this to compress their installation folders, and you can save a fair chunk of space that way. Note, though, that these tools don't help you on files that ever change. These tools are good for files that just sit there. So, if you have a large Boost library installed, for example, it's great for that too. :)
 

mckyvlle

macrumors 6502a
Nov 21, 2007
575
5
London, UK
I see. I will give it a go at the Applications, Developer and Macports folders. At least those are easy to replace if it blows up.
 

LordDeath

macrumors member
Feb 28, 2013
68
83
I installed this tool over the MacPorts and it is great!
It saved ~2GiB on my MacTeX installation and it also saved a lot storage on Application Bundles. I haven't noticed something incompatible yet and I also don't feel any performance drawbacks. The Core i5 and the SSD in my MBA are fast enough to compensate this additional on-the-fly decompression. :)
 

benwiggy

macrumors 68020
Jun 15, 2012
2,367
178
Funny how things go out of fashion and then return:
http://en.wikipedia.org/wiki/DiskDoubler
"Eventually, ... changes to the underlying filesystem and ever-increasing drive space killed off this product niche."

Even a saving of 2Gb on a modern system are not really worth any potential problems -- such as being able to get at your files.
 

Mr. Retrofire

macrumors 603
Mar 2, 2010
5,064
518
www.emiliana.cl/en
Funny how things go out of fashion and then return:
http://en.wikipedia.org/wiki/DiskDoubler
"Eventually, ... changes to the underlying filesystem and ever-increasing drive space killed off this product niche."

Even a saving of 2Gb on a modern system are not really worth any potential problems -- such as being able to get at your files.
Over 90 percent of Apples OS X is already compressed. So it is a fully supported feature on (Mac) OS X 10.6.x and newer. Btw, Apple compresses also updated parts of OS X.

Compression is still useful. Even SSDs use compression (SandForce controller).
 

Ant0ine

macrumors newbie
Feb 10, 2013
5
0
Over 90 percent of Apples OS X is already compressed. So it is a fully supported feature on (Mac) OS X 10.6.x and newer. Btw, Apple compresses also updated parts of OS X.

Where does this number come from exactly? 90% of what is compressed ?
 

MrGimper

macrumors G3
Sep 22, 2012
8,436
11,673
Andover, UK
Just been speaking to the devs of "Clusters".. V 1.7.1 just released is compatible with Mav in case anyone was interested. Think I'll buy it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.