If the Identify choice is by Content, files are recognized by matching file contents instead of the file name. When you choose by Content, the four fields underneath the Identify setting become active. These fields define what the file contents should be to define files of the current File Type, as follows:
Tag Offset determines the starting position in the file (counting from 0) where the contents should be matched. The default value is 0, meaning "match the contents starting at the very first character of the file." A Byte Offset of 1 would start matching the contents at the second character of the file, and so on.
Tag Type determines the type of value that is to be matched in the file contents: Byte, Short, Long, or String. Most files are ASCII files consisting of the String data type (that is, words and characters that you can type). A Byte type is a one-byte numerical value, a Short is a two-byte numerical value, and a Long is a four-byte numerical value.
Tag Value determines what to look for in the file contents. This value must be of the type defined in the Tag Type setting.
Tag Mask is an optional field that you can use to define a mask value for Byte, Short, or Long data types. If a mask value is defined, a logical AND operation is performed on the Tag Type in the file being bound and the Tag Mask to determine the match value (the contents to be matched). If that value matches the Tag Value, then the file is bound. This field is primarily intended for programmers developing applications to be integrated into the DeskSet environment.
See the magic manual page for advanced information about the Tag Type, Tag Mask, and Tag Value fields.
Figure 16-11 shows that PostScript files can be recognized by the string "%!" at the beginning of the file (Tag Offset = 0, Tag Type = String, Tag Value =%!). Note that PostScript files can also be recognized by files ending with.ps, as described previously in the section "Identify By Name".
Figure 16-12 shows the sun-raster File Type entry. This class of files is defined as all files starting with the Long value 0x59a66a95.