File format design
If you decide that you must create a new file format, here are a
few hints that might help making your format more popular:
- Give it a file extension that nobody else uses yet.
So, no other image file format with the .IMG extension!
- Write a specification describing the file format in detail.
Make it freely available in a standard document format like HTML,
PostScript or PDF (read: no Word DOC).
Use English as your language of choice.
Add your specification to the usual websites like
wotsit.org.
- Get a MIME type for your file format.
RFC 2048 describes how to register a new MIME type.
- Ask other developers for their opinion in a suitable newsgroup.
- Provide a free library to read and write your file format.
Use a widely supported programming language like C or Java, have
cross-platform support in mind and add small applications that demonstrate
the use of your library.
- Create a homepage for the file format where people can download the specification,
the library and sample documents in your format. Add that homepage to
the major web search engines.
- Choose a unique magic byte sequence, a number of eight or more
bytes that all files in your format start with. Check out the file(1)
utility to see whether your files are identified as something else.
- Use a chunk structure for your file format. This means that each part of
the file will have a signature which identifies it, its length in bytes followed by
the data of that part. This way, older software will be able to skip parts of the
file that it doesn't know.
- Make use of checksums so that reader software (or other tools) will
be able to detect errors caused by erroneous or truncated transfers or
disk damages.