Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you create a file format?

I've been doing some reading on file formats and I'm very interested in them. I'm wondering what the process is to create a format. For example, a .jpeg, or .gif, or an audio format. What programming language would you use (if you use a programming language at all)?

The site warned me that this question might be closed, but that's just a risk I'll take in the pursuit of knowledge. :)

like image 837
orbit82 Avatar asked Jul 23 '10 19:07

orbit82


People also ask

How do you define file format?

The file format is the structure of a file that tells a program how to display its contents. For example, a Microsoft Word document saved in the . DOC file format is best viewed in Microsoft Word. Even if another program can open the file, it may not have all the features needed to display the document correctly.


1 Answers

what the process is to create a format. For example, a .jpeg, or .gif, or an audio format.

Step 1. Decide what data is going to be in the file.

Step 2. Design how to represent that data in the file.

Step 3. Write it down so other people can understand it.

That's it. A file format is just an idea. Properly, it's an "agreement". Nothing more.
Everyone agrees to put the given information in the given format.

What programming language would you use (if you use a programming language at all)?

All programming languages that can do I/O can have file formats. Some have limitations on which file formats they can handle. Some languages don't handle low-level bytes as well as others.

But a "format" is not an "implementation".

The format is a concept. The implementation is -- well -- an implementation.

like image 186
S.Lott Avatar answered Oct 13 '22 23:10

S.Lott