background image
Bionic Buffalo Tech Note #66: File Identification Headers
The routines use separate  
 structures for application, organization,
and owner.
A stand-alone program, 
, is also included with the morocco distribution. 
 will display
information from the identification headers of files specified on its command line.
A program may not assume that the header will not change from time to time as long as the application
does not have the file opened. Each time the file is opened, a program should examine the header, and
determine (among other things) the offset of the beginning of the file contents proper. All i/o access
must be offset by a variable amount, depending on the current length of the identification header. This
assumption of mutability permits utilities to modify files with limited knowledge of their contents. For
an ownership transfer utility might change the owner information without regard to the
format of the data itself, and without concern for the application or organization
a database utility might perform backup, compaction, or other activity, possibly altering
the content and size of the header organization information
Except for software which knows the organization of the file's contents (such as a keyed access or
database routine, and some applications which manage their own file structures), the file contents
beyond the header should remain unchanged. If the header is expanded, however, the contents may be
moved away from the beginning to accomodate the expansion. Similarly, when a header shrinks, the
contents must be moved toward the beginning to take up the gap. Movement of the contents after the
header should account for the alignment requirements specified in the fixed portion of the
identification header.
This Tech Note may be reproduced and distributed (including by means of the Internet) without
payment of fees or without notification to Bionic Buffalo, as long as it is not changed, altered, or
edited in any way. Any distribution or copy must include the entire Tech Note, with the original title,
copyright notice, and this paragraph. For available Tech Notes, please see the Bionic Buffalo web site
at, or e-mail PGP/GnuPG key
a836 e7b0 24ad 3259 7c38 b384 8804 5520 2c74 1e5a
. Most Bionic
Buffalo Tech Notes are available in both HTML and PDF form.
Page 7 of 7