|
|
Change Finder sizes between Base 10 and Base 2
I skimmed the source code, but ... well ... can someone with a better foundation in Foundation explain how it works? TiA.
Change Finder sizes between Base 10 and Base 2
Basically it reads the copy of the foundation framework on your disk and looks for certain patterns, and then replaces a couple of carefully selected bytes. As to what exactly those bytes do, I'm actually not sure, though I'd sure be interested to know. They don't seem to be anything obvious like a divisor.
Change Finder sizes between Base 10 and Base 2
thanks. i read it again and ... i am still all "eek!"
i'm not gonna run this program, but i'm curious: does it take forever to run? it loops over every byte of a 10+ MB file (on my MBP). (and
for (i = 1; i < (fileLen - 160); i++)
{
while (i < (fileLen - 160) && ... ) i++;
if (i >= (fileLen - 160)) break;
...
}
is a mess. just sayin'!)
Change Finder sizes between Base 10 and Base 2
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.) Edited on Jan 06, '12 11:59:44PM by arcticmac
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|