/blag/

An easy way to create your own file format

tue20jun2006—25w171d46%— 12h40m00s—0utc

I stumbled upon the .CBR extension some days ago and it was interesting to read its description, via filext:

This is a renamed .RAR file and can be decompressed with any .RAR file utility. The CDisplay program displays the comic book images so it is useful to use for this particular .RAR archive type.

Think about it, to create the ultimate comic-book format you simply wrap together some images (GIFs, JPGs, PNGs) and some (optional) introductory text (a .NFO or a .TXT) in a .RAR file and rename it. That’s it. A batch of pictures has been converted into a black-box, into a comic book. We’ve reified a comic out of thin pixels. That’s all CDisplay needs to let you seamlessly experience those images as a comic, but you could get as baroque in your specification of a file format as you like. For, say, a hypothetical .BIO file-extension used to store people’s biographies, you would specify a .RAR wrap of that person photo (that must be named, say, “mypic”, and must be a JPG), one photo as a kid (named “kidpic”), one photo of each parent ("mompic and “dadpic”), a curriculum vitae (“vitae”, must be a .TXT file),… you get the picture. Half of the magic, of course, resides in the reading-program, but that’s the easy part.

Here are two extra, contradictory advantages of creating file-formats thru .RAR wrapping:

the tying is loose

The elementary constituents are still available to anyone with a .RAR decompressing utility.

the tying is tight

You’re using a compression format after all, so you are probably saving at least a couple of bytes (though the time spent decompressing things on the fly could easily turn this into a disadvantage).

What struck me about this file-extension thing was how such a seemingly low-level nitty-gritty construct as a file-extension can be blackboxed mostly thru the high-level path of drag-and-dropping icons to WinRar.

Follow me on Twitter!  |  Back to ELZR.com