Re: I found your name in Linux's /usr/lib/magic

Daniel Quinlan (quinlan@proton.pathname.com)
Sat, 19 Oct 1996 18:12:23 -0400 (EDT)

> Christos, I assume you want to help. Right? You're the one with the
> real experience with file(1).
>
> We might also want to bring in Greg Roelofs <newt@uchicago.edu>. He
> designed the magic for PNG and might have a few good ideas.

I'll set up a mailing list including you, Christos, Greg, and me and
issue a charter posting.

FYI, here's what I've roughed up as an intro to the draft.

============================================================================
Cross-platform file export through means like public FTP directories has long
been an important mechanism of Internet information sharing. More recently,
the growth of the Internet has been driven by technologies such as the
World Wide Web, which give it (among other things) the aspect of a single
huge distributed file store.

In such an environment, it is very desirable that files should
generally present themselves as self-describing objects from which a
navigation tool can readily deduce both their uses and at least some
of the semantics of their contents. An effective set of such
conventions can enable tools such as Web browsers to inform users
according to such deductions, and to dispatch to appropriate
sub-interpreters and user agents on the file object's semantic type.

The Internet's major operating systems have traditionally shared two
means of ad-hoc semantic typing for files. The better known is the
quasi-systematic use of file name "extensions" to carry semantic
information (most Internet habitues, for example would feel
justifiably surprised if a file with extension ".gif" were not to
contain picture data in the well-known Graphic Interchange Format).
Standardization of such file name extensions would be a desirable goal,
but very complex and beyond the scope of this RFC.

The other, prevalent especially under Unix, is the quasi-systematic
use of "magic numbers" in binary-format files. Many Unix binary
formats have an initial segment of fixed pattern intended to uniquely
identify the file type for the purposes of loaders, linkers, graphics
viewers, and other tools.

The purpose of this RFC is threefold:

(1) To enunciate guidelines and design principles appropriate when choosing
magic numbers for a new file type.

(2) To advertise a central Internet registry of "magic numbers", with
procedures for checking candidate segment patterns against the registry
and for claiming new patterns.

(3) To define a new standards-compliance category of MAGIC programs (MAGIC =
"Magic Awareness 'Gainst Internet Complexity") which are required to
be aware, in certain well-defined ways, of registered magic numbers.
============================================================================

Yes, I know the acronym is weak. Suggestions for improvement welcomed.

-- 
	<a href="http://www.ccil.org/~esr/home.html">Eric S. Raymond</a>