[vorbis] Why the commotion about file extensions?

Nicolas Romantzoff nicroman at free.fr
Mon Jul 14 05:29:09 PDT 2003



Hi,

I think you just misunderstanding completely why file-types are so
important...

<p>Un*x world has came to life when windowing systems were not present, and
the only way to launch a tool on a file was to specify in the command
line the tool and the file. No extension needed, magic content to find
out which kind of data was contained.

When developping an advanced interface system, the user simply doesn't
want to know which program is able to print that file, view it, or edit
it... He just wants to print it, or view it, or edit it, no matter how
the system is setup.
The system just needs to know how to perform some tasks on a file,
whatever it is.

There are not so many ways of doing this:
- Parsing the file content for magic things in a big big database =>
enforces ALL files to contain magic signatures (but how would you see
the difference for those formats not implementing magic signatures, like
RAW, TXT, or AU). This would force the system to launch a big bunch of
processes just to determine the type of the file. Once it is done, it
should probably cache the result somewhere (storing a type ID ?). The
other problem is when you are not allowed to parse the content of a
file, but still need to know its type.
- Store some resource information along with the file (MacOS way) => you
only need that "resource fork" access to determine the type.
- Store some type information as an extension to the file name itself
(DOS way) => you only need the name of the resource to determine the
type.
- Store the type information directly in the file name (Windows way) =>
equivalent to DOS way

Sincerely, I hate Microsoft Windows (though with XP it became pretty
good), but the the last solution is the fastest and the most conveniant,
though surely not the more secure since anyone can change the name of
the file (note that this is the reason why by default on windows you
simply do NOT see the extension, and you cannot change it without a big
"warning").

<p>BTW, since im developping for all three major systems (with no
particular preference though Windows is clearly the only profitable
target), the most conveniant way is probably the extension way, allows
an HTTP server to return content-type information without having to
parse the file, and the code is working in all environments especially
since Windows accepts any size for the extension (.targa ?).

<p><p>Nicolas Romantzoff

<p><p>-----Original Message-----
From: owner-vorbis at xiph.org [mailto:owner-vorbis at xiph.org] On Behalf Of
Jens Prüfer
Sent: Monday, July 14, 2003 12:35 PM
To: vorbis at xiph.org
Subject: [vorbis] Why the commotion about file extensions?

<p>Hello all,

why is there all the commotion about file extensions? I do strongly
believe 
any software using those extensions for identification of file contents
is 
broken. After all, it is very easy to name a DivX Video .doc. Yet that
ending 
changes nothing about the contents of the file. Word will complain about
the 
content or (more likely) display a load of gibberish. More dangerously 
changing .exe or .com to .txt is also possible, smuggling in malicious
code 
via email etc.

Instead an up-to-date magic file and truely looking at file headers is
the far 
better way. Don't you aggree? I don't know, why this is not the standard
way 
to do things. I guess, because Microsoft thinks looking at three letter 
extensions is good enough for them, it should be good enough for the
rest of 
the world as well.

Cheers

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list