Copyright (c) 2004 Mark Aylett <mark@emantic.co.uk>
Mar is freely
available, with source, under a very liberal license
(the MIT license).
A meta archive or mar file uses a simple binary file format to store both meta and user data together in a single file. A mar file may be suitable in situations where a full-scale database is not.
Both the mar library and the accompanying utility are written in C with the intention of porting to many platforms. A set of C++ wrapper classes (along with a test file that utilises these classes) are included. These classes provide familar stream and iterator abstractions over the mar library. The package has currently been tested on PCs running FreeBSD, Linux and Windows ME, 2000 & XP. Some testing has also been conducted on architectures running HPUX & Solaris
Although the mar library supports only minimal documention at this time, it is a relatively simple API, and the header file should provide most of the details needed to get started. In addition, the source file for the mar utility provides many working examples.
A manual page for the accompanying utility is also included. It offers a general overview along with some examples.
The current version is 0.5, please take a moment to review the change log when upgrading between versions. The source package can be downloaded from: http://www.emantic.co.uk/mark/files/mar-0.5-src.tar.gz. Alternatively, a package containing pre-built Windows binaries can be downloaded from: http://www.emantic.co.uk/mark/files/mar-0.5-win32.zip.
To build and install the mar library and utility on a POSIX system, run "make install" from the base directory of the mar package (in which the makefile is located). By default, the package will be installed to directories with a /usr/local prefix. An alternate prefix directory can be specified by modifying the PREFIX variable. For example, to install using a prefix of $HOME/local, run "make PREFIX=$HOME/local install".
To build using the Microsoft Compiler, use the nmake makefile located in the msvc sub directory of the mar package. A number of different configurations are supported, as listed in the table below:
CFG | Description |
---|---|
marl1 | Single-threaded static library |
marld1 | Single-threaded static library (debug) |
mart1 | Multi-threaded static library |
martd1 | Multi-threaded static library (debug) |
mard1 | Multi-threaded shared library |
mardd1 | Multi-threaded shared library (debug) |
To build a single-threaded static library for example, run "nmake -f Makefile.mak CFG=marl1" from the msvc sub directory.
The mar utility uses the public domain version of getopt - a much appreciated contribution by Henry Spencer. Thanks also to James Wydenbach for his valued contributions to the mar package.
Mark Aylett