Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Change Finder sizes between Base 10 and Base 2' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change Finder sizes between Base 10 and Base 2
Authored by: arcticmac on Jan 06, '12 11:58:23PM

On a modern computer, looping over that many bytes doesn't take very long, especially when all you do at each one is to check and see if it matches one of four pre-defined values. If you think about it, it's actually only reading from each offset once (although I admit, I kinda thought it was going to double over the first time I read the code). It takes about a half a second to run the patch on my MacBook (which is ~4yrs old). (I modified the code so that it edits a _copy_ of the foundation framework that I made elsewhere so that I don't need to have it run rooted. makes me feel a little safer somehow, even though I know the difference is probably negligible.)

Closer inspection reveals that the change made (at least under 10.6) is to change a -24 to a 0, so that 1024+(-24) becomes 1024+0. Interesting, it looks like the framework has another way of accomplishing this itself, if a particular bit in a bitfield is either set or not set. I wonder if it might be possible to set that bitfield via a pref someplace instead of needing to patch the framework (patching system frameworks is a yucky solution!).

Edited on Jan 06, '12 11:59:44PM by arcticmac

[ Reply to This | # ]