[vorbis] Why the commotion about file extensions?

Moz lists at moz.co.nz
Mon Jul 14 16:50:42 PDT 2003



Olaf wrote:
> You are right, I think files shouldn't identified by extension, the
> Mac Classic's way (fourcc for type and fourcc for creator) is a much
> better method.

Actually, the MAC way sucks a lot. You get a file, you try to open it,
you get a dialog "you need App X to open this file"... The idea that
there is one version of a file type per creating application is
nonsensical, IMO. Photoshop-jpg should be identical to gimp-jpg. I
hope this has changed in later versions of MAC-OS, but I still get it
at work every second day when people send us artwork.

The other reason for file extensions is speed - to work out file type
you only need the file node/inode/directory entry, rather than having
to seek to the first block of the file and read some amount of the
file. This makes a huge difference when you're adding files to a
playlist - "grab all the files that end with .ogg" is a heap faster
than "grab all the files that start out like <this>". Think of the
number of programs that use a file-open dialog, and filter to only
show the files that the program can open...

Having written a small switcher app for DOS that tried to
differentiate between about 30 image file formats based on file
content, it's not trivial. One problem is that it only takes one file
type that is <random data plus checksum>, and you have to checksum
*every* file to make sure that it's not one of those files that just
happens to start with "PK" (zip file header) or whatever. Another is
that some files are pure compressed data, differentiated only by the
extensions (.rar, anyone?). And compressed==random, by definition.

Moz

--- >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