伯乐共勉

讨论。NET专区
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Mork 简介

Posted on 2007-08-30 10:02  伯乐共勉  阅读(368)  评论(0编辑  收藏  举报

Mork is a computer file format used by several email clients and web browsers produced by Netscape, and later, Mozilla Foundation. It was developed by David McCusker with the aim of creating a minimal database replacement that would be reliable, flexible, efficient and use a file format close to plain text.

The conflicting requirements gave Mork several byzantine qualities. For example, despite the aim of efficiency, storing Unicode text takes three or six bytes per character. Also, despite being plain text, Mork is generally regarded as unintelligible to humans and as a hard format to write parsers for. Jamie Zawinski, a former Netscape engineer, once called Mork "...the single most braindamaged file format that I have ever seen in my nineteen year career." [1] and in the comments of his Perl parser for Mork, Zawinski refers to McCusker as a "complete barking lunatic" [2].

The Mork format is used in most Mozilla-based projects, including the Mozilla browser suite, SeaMonkey, Firefox and Thunderbird. In Firefox, it is used for browsing history data and form history data. In Thunderbird, it is used for many things, such as address book data (.mab files) and the mail folder summaries (.msf files).

The upcoming replacement system, used for storing all user configuration data, is called MozStorage. MozStorage is based on the SQLite database. As of Firefox 2.0, it is available for use by extensions, but Places, the replacement of Mork-based history data and XML-based bookmark data, will not be introduced until later due to a number of bugs