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


1024 bytes | 34 comments | Create New Account
Click here to return to the '1024 bytes' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
1024 bytes
Authored by: englabenny on Apr 09, '03 11:46:52AM

Hm the normal -s output of lsmac outputs the sizes in 1000 bytes' kilobytes and 1 million bytes' megabytes. And, also the -sl option does to. On a 300 kb file this leads to an error of ~5kb. So why whine? I want it do display correctly! :D

Why? I think I'll change the code, where I can see he uses byteCount/1000 to get kiloByteCount.

But hey - thanks for open Source!



[ Reply to This | # ]
1024 bytes
Authored by: Hes Nikke on Apr 09, '03 02:54:35PM
i see the proper 10^X byte prefixes on KB, and MB (for once)

perhaps your looking for the 2^X MiB, and KiB?

---
vacuums do not suck. they merely provide an absence that allows other objects to take the place of what becomes absent.

[ Reply to This | # ]

1024 bytes
Authored by: englabenny on Apr 09, '03 03:53:22PM

Yes I do, because that's the way to correctly display file size, or atleast the way Finder does it. Eventhough they call 'em KB and not KiB.



[ Reply to This | # ]
why would you want base-10 sizes?
Authored by: Lizard_King on Apr 09, '03 06:17:32PM

This is definitely not a flame, just an academic question ;-)

I'm just trying to understand why you would want to see file sizes (or any other system metric) in decimal. Systems are inherently binary by nature so representing this information in any other base besides base-2 would be inaccurate.

I guess I could see if you are trying to do approximations and require quick math, that might suffice... any insight for me?



[ Reply to This | # ]
why would you want base-10 sizes?
Authored by: Hes Nikke on Apr 09, '03 10:03:47PM

did you read the link?

the link explains all about Mega, and Mebi, and why the computer industry applied non-standard difeninitions to terms that are standard every else.

you're right, they noticed that 1 KiB and 1KB were almost the same (1024, 1000) and that is were all our trubbles bagan

---
vacuums do not suck. they merely provide an absence that allows other objects to take the place of what becomes absent.



[ Reply to This | # ]
1024 bytes
Authored by: Hes Nikke on Apr 09, '03 11:05:26PM

and here is the <a href="http://programming.ForgottenNewbies.com/~natef/lsmac 0.3.1.tar.bz2">bug fix</a> this is version 0.3.1, it's been emailed to the auther, but it isn't official yet. the changes since 0.3.0 are:

* lsmac human readable format is now base2 (MiB) rather then base10 (MB)
* added -B switch to show in base10 (MB)
* for more info on MiB see http://www.wikipedia.org/wiki/Byte_prefixes
* posibly fixed a bug with the physical size setting (was checking for the -l switch and then ignoring it)

---
vacuums do not suck. they merely provide an absence that allows other objects to take the place of what becomes absent.



[ Reply to This | # ]
1024 bytes
Authored by: Hes Nikke on Apr 09, '03 11:06:46PM
hmmm.. i could sware i saw a clickable link when i did that preview...

---
vacuums do not suck. they merely provide an absence that allows other objects to take the place of what becomes absent.

[ Reply to This | # ]