Hi, folks!

Perhaps what I'm going to say is known by most of us, but I think that it
isn't bad to remember it, and that it's a good idea to look at it as a
whole ;-) .

When transferring files between the PC and the Mac, you have to take into
account two differences between them. The first is the filesystem: PC's
diskettes use FAT12, where Macintosh diskettes use HFS. That's the obvoius
one. Second difference is that PC's files have only a stream of bytes, but
Macintosh files have *two* parallel byte streams, called "forks": the "data
fork" and the "resource fork". The data fork is used to keep binary data
(i.e., documents, pictures, etc.). The resource fork is used to keep
executable code and "resources" - pieces of data used by the executable
code.

The problem is that when we transfer a file from the Macintosh to a PC, a
Unix box or other kind of computer that doesn't support forks, if we do
nothing speciall we will only transfer the data fork. With documents that's
not a big problem, because most Macintosh applications' document format use
only the data fork. But applications themselves, system extensions
(INITS/CDEVs/drivers/whatever), icon files and other kinds of files do have
both forks - and store the most important content on the resource fork.

This problem also happens when we download a file from the Internet
directly with our Macintosh. Internet protocols (like HTTP and FTP) don't
know anything about forks.

To solve this, two formats have been created that "pack" both the data and
the resource forks in a single data stream that can be uploaded securely to
other kinds of computers. These formats also store Macintosh-specific file
information, like the creator and the type of the file. The formats are
BinHex and MacBinary, and the standard file extensions associated with them
are .hqx and .bin, respectively.

Thus, when you get with a PC a Macintosh file from the Internet, you need
to know what kind of file it is before transferring it to a Macintosh
diskette using TransMac, HFV Explorer or any simmilar software. As a sule
of thumb, you can look at the file's extension. If it is .hqx, it's encoded
with BinHex. If it is .bin, it's encoded with MacBinary. And if it's other
extension, it probably is a raw data file, equivalent to a data-fork-only
in the Macintosh. You need to set up properly TransMac for that file before
attempting to copy it. And I don't think the Auto-detect option is a good
one: that one fails sometimes...

The forks are also the guilty of us not being able to copy a downloaded
file to our Macintosh using a PC-formatted diskette and PC Exchange: even
if Apple has defined extensions to the FAT12 filesystem to support
Macintosh extended features (like the resource fork, creation date/time,
type/creator info, etc.), the PC doesn't know about that extensions, and
creates plain files that are seen by MacOS as data-fork-only files... Of
course, you can allways copy a BinHex or MacBinary file to a PC diskette,
use PC Exchange to open the diskette and copy the file to the Mac's hard
disk, and then unencode with the corresponding Macintosh application - I'm
sorry I don't know which one should be used for BinHex or MacBinary. Anyone
can help me here?

About the disk images: disks can be seen also as a series of sectors
(chunks of data of fixed size), and thus, as a stream of bytes. A disk
image is a file that contains a byte-by-byte copy of an actual diskette.
This includes also some "hidden" parts of a diskette, like the boot sector,
the root directory and the directory structures. In other words, when you
make a disk image of a disk containing several folders and files with data
and resource forks, you obtain a single byte stream that contains all the
files, folders and attributes of the original disk. And, because it is a
single byte stream, it can be transferred as a standard file to PCs and
Unix boxes, and is really a data-fork-only file on the Macintosh.

Standard disk images are one of the most compatible formats I know, and can
be read/written from/to diskettes without problems on any platform/OS. That
means that you can not only create Linux boot diskettes from DOS/Windows,
but also use the same tools to create Apple ][ or Macintosh diskettes or
disk images. There are ven some utilities in both the PC, the Mac and Unix
that let you access a disk image like a file archive or even the same way
as if it were a real device.

I must add that PC hardware isn't able to read/write Macintosh 800 Kb
disks, and that early Macintoshes (non-Superdrive) aren't able to
read/write PC 720 Kb disks. But provided the image is 1.440 Kb in size and
the Macintosh has a SuperDrive (or two :-) ), you can use a PC to create
the diskette from the disk image.

However, if the image file we have downloaded from the Internet is
compressed, we will need to uncompress it before writting it to a diskette.
If it's compressed using ZIP, the more common format on the PC, there isn't
any problem, but it is not ussual. Most times we will have a Macintosh
compression format, and will end up having to carry the file to the
Macintosh, uncompressing there, and using Apple's Disk Copy in order to
create the diskette - an uncompressed disk image doesn't fit in a diskette,
because it contains more data than just the files, so you can't carry it
back to the PC.

Greetings,

Antonio Rodr�guez (Grijan)
<ftp://grijan.cjb.net:21000/>



-- 
Compact Macs is sponsored by <http://lowendmac.com/>.

      Support Low End Mac <http://lowendmac.com/lists/support.html>

Compact Macs list info: <http://lowendmac.com/lists/compact.shtml>
  --> AOL users, remove "mailto:";
Send list messages to:  <mailto:[EMAIL PROTECTED]>
To unsubscribe, email:  <mailto:[EMAIL PROTECTED]>
For digest mode, email: <mailto:[EMAIL PROTECTED]>
Subscription questions: <mailto:[EMAIL PROTECTED]>
Archive:<http://www.mail-archive.com/compact.macs%40mail.maclaunch.com/>


---------------------------------------------------------------
>The Think Different Store
http://www.ThinkDifferentStore.com
---------------------------------------------------------------

Reply via email to