7.09.2011

MIME

I always wondered how Linux desktops were able to share filetype informations without converting between their own formats. So I remembered that was something MIME to uniquely identify filetypes using strings with a very simple notation. Not sure whether they actually use it internally, I like it's concept and that everybody can send in their own type specifiations on request. It's truely a worthy thing to do: rely on it to detect file types and you can handle them later using this type information. Though currently only a thing that's not deeply rooted in my coding interest, I like the idea of passing file stream and then getting getting back a simple string or int type identifying the file type. A lovely idea! Really. And also a lovely idea to implement it for ITK! But it will be a quite repetitive work implement all the file header readers. Well, atleast I only need to read the headers at all. This should keep code small to a minimum. Gnaahh, my inner nerd is getting by that idea of getting the actual filetype with a single command. Though due to heavy comparison work quite slow and massive in the amount of required code, I'll simply included it as a non-yet implemented header file in ITK. I have to say this is in general a comftable way of implementing features: write a header with all structures and prototypes you want to give and implement it later when you have the time or just give it to someone else working in your team. Effectively the lowlevel variant of class interfaces they all praise so much by not understanding that all this stuff was already there before they really started with it. Whatever...

No comments: