[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Mac File 'GetInfo' Size Descrepancies



At 11.05 -0500 1998.05.26, Greg Aiken wrote:
>I'm unclear why in Mac OS, if one selects a file, then chooses 'File/Get
>Info', the file size is shown as two distinct fields (xk on disk, y
>bytes).

Well, two reasons.  First, K is not as specific.  If something takes 1K, it
could be 512 bytes or 1024 bytes, a big difference percentage-wise.

Second (and this helps answer your other question) is that all filesystems
have a "block size".  On older Mac OS systems, a volume could only have
65355 blocks total, so the larger the volume, the larger the block size.
For a 1GB volume, the smallest possible file would be about 16K (even if it
only took 512 bytes).  So when moved to a floppy, the file would only take
1K, probably.  That's a drop by a factor of 16, a huge savings.

In HFS+ (Extended HFS), you can have a lot more blocks, hence a lot smaller
block sizes.

>a. Whats the significance of the two numbers? and
>b. Why is it that if the same file is copied to/from a floppy and a hard
>disk, the values shown for 'on disk' will be different on the floppy
>than will be shown for the hard disk?

Hope this helps,

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch