mozdev.org

MAF

MAFF files are standard ZIP files containing one or more web pages, images, or other downloadable content. Additional information, like the orirginal page address, is saved along with the content; this metadata allows the browser to open these files intelligently.

Features of the MAFF file format

Status

Full support for the MAFF file format is provided by the following versions of the Mozilla Archive Format extension:

The file format supported by these versions is referred to as MAFF version 1. Previous versions of the MAF extension may not support all the features available in the MAFF file format version 1.

Technical overview

This is not intended to be complete by any means, and is based on the reverse engineering of the existing MAF extension.

File extension and type

MAFF files use the .maff file extension. Internally, the MAF extension for Firefox registers the MIME type application/x-maff for files with the .maff extension, unless there is already another MIME type association in the system. However, this MIME type is not advertised outside of Firefox, for example when the file type is registered with the operating system on Windows.

ZIP implementation

MAF uses nsIZipReader and nsIZipWriter from Mozilla Firefox. Their implementation is based on PKWARE's ZIP Application Note. File and directory names are stored using UTF-8.

Directory structure

The root directory is empty. There is one subdirectory for every saved page. Every subdirectory contains a file named index.rdf, with the metadata, and another file with the main web page that was saved. This file is usually named index, with a file extension based on the content type.

Metadata

Information about the archived files is stored using RDF, an XML format particularly suited to describe metadata about web resources. The matadata is stored using a special MAF XML namespace.

Roadmap

MAFF version 1 is defined on the basis of the existing implementation. As new versions of MAF are released, the description of the file format will be updated, to accomodate the new features. The MAFF format will be extended while ensuring full interoperability between the circulating versions of MAF. This will lead to a more formal definition of MAFF version 2, a superset of MAFF version 1.