[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: MIME type meta-data

From: Matthew Hambley <matthew_at_aether.demon.co.uk>
Date: 2003-03-07 21:02:48 CET

In message <20030306163030.7A381F917@tater>
          Paul Lussier <pll@lanminds.com> wrote:

[snip]
> Btw, I don't know how much this will help, but as I was perusing the
> latest issue of Linux Journal, they made mention of freedesktop.org.
>
> A quick perusal of this site reveals this URL:
>
> http://www.freedesktop.org/standards/shared-mime-info.html
>
> Which is about a proposed shared MIME-type database standard. I
> haven't read anything about it yet, so I have no idea whether the
> information there is even useful... Maybe it's at least got
> something worth pondering by those a whole lot smarter and closer to
> this issue than me :)

I've had a quick look at it and it is, as you state, a proposed standard.
It presents a unified file structure for holding MIME type information
including human readable forms of each MIME type in various languages,
file extension mappings and magic search strings.

I'm a little unsure as to how useful it is to this problem. There is no
library for accessing this data, it is just a file format. This makes it
little different from mime.types. The parsing of the file may be a little
easier but not massively so. My main concern is that each lookup requires
the entire file to be scanned.

In mime.types all extensions for a given MIME type appear on one line.
e.g. "text/html htm html" Whereas with this new standard they appear on
different lines at arbitrary points in the file. e.g. "text/html:*.html",
"text/html:*.htm" Set against this is the fact that this lookup will only
happen on file adds (and imports) so a small performance hit may be
acceptable.

Using this file would also introduce another dependency into Subversion.

My plan for a first cut at this problem was to implement a simple extension
to type mapping. This should be simpler than scanning the files for magic.
It will give us a chance to try out the feature. If it proves useful
and/or the simple approach is insufficient then a more complicated one
could be tried.

Does anyone have any comments to make on the use, or not, of this map file
format over mime.types?

-- 
(\/)atthew )-(ambley ---------------\ If something's worth doing it's worth
E-mail : matthew@aether.demon.co.uk  \ doing badly until you can learn to
Public key : C991137B                 \ do it well.
Web : http://www.aether.demon.co.uk/   \-----------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 7 21:04:13 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.