[comp.misc] Advice needed on data file design

pshuang@athena.mit.edu (Ping-Shun Huang) (06/21/91)

In article <1991Jun20.124643.19298@kcbbs.gen.nz> Peter_Gutmann@kcbbs.gen.nz (Peter Gutmann) writes:

 > The idea is (I'm told by Mac people) that eg for Macs the file-transfer
 > programs can recognise the file from the ID in the first few bytes

Whether you should bother to put in the header information depends on
your application.  I think the Macintosh people to whom you were talking
were referring to the MacBinary header which is 512 bytes prepended to
Macintosh files for telecommunication purposes which store information
about the file that is special to Macintosh file systems as opposed to
simpler file systems such as MS-DOS.  Unless you're willing to customize
the telecommunication protocols so that they can do something special
with your files as they are tranferred, and unless there's some reason
you would want them to do this, it really makes very little difference.
I can't think of very many situations you would want to put information
into the file header so the xfer protocol can give differential
treatment of your data files.  It is true that the leading four bytes
might be used to identify the particular file being tranferred, but
that's what filenames were intended for, after all, and if you're using
true Ymodem (as opposed to simple extensions to Xmodem) then the xfer
protocol will already know the filename anyway.

--
Above text where applicable is (c) Copyleft 1991, all rights deserved by:
UNIX:/etc/ping instantiated (Ping Huang) [INTERNET: pshuang@athena.mit.edu]