COGENT Online
CONTENTS
COGENT Help

Archive Files

What is an Archive?

Archives are single files that contain entire COGENT research programmes. In COGENT's normal mode of operation, the models within a research programme are each contained in a separate directory or folder within the user's project directory. This makes transfering models and/or complete research programmes between machines difficult, because you need to transfer the contents of an entire directory. It also makes uploading and downloading research programmes from the web more difficult than necessary. By stuffing all of the relevant files into a single file, archives provide a convenient portable format for transfer and exchange of complete research programmes.

The Archive Browser

The archive browser is an interface tool that allows research programmes to be transformed into archive files and vice versa. The browser window (shown below) consists of a list of research programmes (on the left) and a list of archives (on the right), with two buttons between the list for transforming one format into the other. To archive a research programme, select the desired research programme and click on the >>Archive>> button. To extract an archive, select the desired archive and click on the <<Extract<< button. Preferences relating to archives (e.g., the format in which archives will be created, the locations of archives and research programmes, and whether research programmes/archives should be retained after they are transformed) may also be set from the archive browser. (See Archive Preferences.)

Supported Archive Formats

COGENT supports several archive formats:

CAR
This is the default, and preferred, format for COGENT archives. CAR files are ACSII text files that contain all files within a research programme. While they may be examined with a text editor such as emacs or notepad, it is not advisable to attempt to edit them. One disadvantage of CAR files is that they tend to be rather large.
COG
The COG format was introduced with the original version of COGENT for windows. In that version of COGENT, it was the native file format: when COGENT was installed files ending in .cog would be automatically opened with COGENT. The COG format only includes one model (rather than an entire research programme) in an archive, and cannot by generated by recent versions of COGENT. However, COGENT can still extract models from COG files into the format used by the rest of the system. This means that COG files created in WinCOGENT can be translated into research programmes for use by the current version of COGENT.
TAR
This format will be familiar to UNIX users. The archive file is a standard tar (tape archive) file, built by using the tar command to package the research programme directory into a single file. TAR archives have two disadvantages: most Windows machines don't have tar (and so they tend to be UNIX specific); and the archive file includes the research programme's name, so changing the file's name won't change the name of the extracted research programme (and may confuse COGENT slightly). On Windows programmes such as WinZip may be used to extract TAR archives.
TGZ
This format will be familiar to UNIX users. The archive file is a standard compressed tar archive, built by first using tar to package the research programme directory into a single file and then compressing that file with gzip. TGZ archives have one advantage and two disadvantages. Since they are compressed they tend to be smaller than equivalent archives in other formats. However, most Windows machines don't have tar or gzip (and so TGZ archives tend to be UNIX specific), and TGZ archive files include the research programme's name, so changing the archive file's name won't change the name of the extracted research programme (and may confuse COGENT slightly). On Windows, programmes such as WinZip may be used to extract TGZ archives.

Each archive format has pros and cons. The CAR format is most portable, and generally recommended. CAR and COG files may be renamed, and the archive will then extract into a research programme of the new name. TAR and TGZ files contain the names of the research programme within them, and so renaming these files will not alter the name of the extracted research programme. Furthermore, TAR and TGZ formats are not supported under Windows. However, the TGZ format is most compact.

If archive file size is an issue, be sure to reinitialise all models in the research programme before archiving it (this generally ensures that message logs and current contents files are small). For reductions in archive size can be obtained by compressing CAR files (using a zip utility), though they must of course be uncompressed before COGENT can extract the contents.

The format of an archive is indicated by the last three characters of the file's name. COGENT uses these characters to work out which extraction routine should be applied to the file. Don't change them!


COGENT Online
CONTENTS
COGENT Help