Mork What Is It

Mork was the name David McCusker gave to a text file format at Netscape. It was used for address books and history files under Mozilla when the mail/news team first released an open source version of the mail user agent; it's still used currently.

The Mork name comes from the famous '80 TV series "Mork & Mindy".

Mork uses markup in a plain text format to describe uninterpreted binary content. Describing Mork as a text format is slightly inaccurate.

Mork is really a binary format encoded in a stream of byte oriented markup. But the binary is escaped when needed to avoid confusing the plain text markup.

Mork does not understand Unicode, which looks like any other binary to Mork.

Mork was intended as a temporary open source stub implementation of the abstract MDB interface, which was a generalization of mail database features desired for the mail/news and address book clients.

However, even as a mere short term stub, Mork aimed to avoid pain points for users and developers:

  • avoid user data loss and corruption if and when incremental writes are interrupted
  • avoid extreme unreadability by writing line-oriented output with continuations.
  • avoid a fixed schema, and permit anything at all to be flexibly added later
  • avoid extra bytes in markup whenever possible for i/o and space efficiency.

The last goal could have been done better in the way binary is escaped. The early version was verbose given heavy doses of non-ascii octets. Adding base64 support was never a priority to management.

你可能感兴趣的:(it)