magic numbers

Care and Feeding of Magic Numbers

Author: A. Main. Date: October 2001. Abstract:

This memo describes techniques for the use of magic numbers in a multimedia context, for the in-band identification of digital file formats. Specific recommendations are made concerning the use of magic numbers in newly developed file formats.

Available as plain text, RFC Editor nroff.

This is an attempt to advise file format designers and implementors about what magic numbers can achieve and how to use them most effectively. I published it as an Internet-Draft, but it has so far met with complete apathy in the IETF, and so is unlikely to ever be published as an RFC as I had originally intended.

magic number selection program

mkmagic is a Perl program to generate magic numbers.