Logo
Back

◆ Data and File MCP Compression

30th September 2010

Flex Interface

FLEX Inquiry now has a new command subset called MZIP:

         +-----------<-------+-- , --+-<----+
MZip --+-+-+---- <directory> -----------+---+--+------------------+---|
GZip --|   |---- <pattern> -------------|      |- <where clause> -|
UZip --|   |---- <filename> ------------|
UNZip -| 

These commands access a fast compression function, using the LZ77 algorithm. MZIP compresses files and their attributes in a format suited to the MCP system. GZIP compresses the data in byte stream files (and loses the file attributes), but the resulting file can be expanded using gunzip on almost any other system. UNZIP (or UZ) expands a file compressed by MZIP or GZIP. But, as yet (07/2010), it cannot expand most files created by gzip on other systems.

To get the output file name, add /MZ for MZIP, ".gz" for GZIP, and /UZ for UZIP. However, if the file already ends in ".gz" or /MZ, MZIP and GZIP will not process that file, while UNZIP will strip off the ending. If the output file title already belongs to a resident file, the action is skipped, unless the AutoRm option is set, when the resident file is replaced.

These commands can also be Actions in :ACT commands.

MZIP and GZIP have 2 specific options to control how they work. ZipMore or ZM controls how much effort goes into the compression in MZip and GZip. If it is OFF, the compression is done with as little CPU time as possible. If ON, about 50% more CPU is used to improve the compression, typically ending with 10% smaller compressed file size.

ZM ON files normally UNZIP more quickly than ZM OFF ones.

ZM can also take an integer value, though this is not saved between sessions. The only current assigned meaning is for ZM 2 in MZip. This value will often add a further 50% CPU time over ZM 1, and drop the final compressed file size a further 7%

All these % figures are data dependent and each file will behave somewhat differently. However, a file with ZM 2 compression will normally need about double the time to UNZIP, vs ZM 1.

The MemSz option is essentially a debug option to override the memory size used by MZIP and GZIP.

It is normally (Default), in which case MZIP/GZIP look at the system to determine how much memory to use, but can be set to (Big), (Med), and (Small) corresponding to 16MW, 1 MW, and 64kW respectively. Add at least 25% if ZipMore in set. MemSz is not kept between sessions.

The XLATE option in MZIP and GZIP does an EBCDIC to ASCII translation, and in UNZIP, an ASCII to EBCDIC one.

◆ Overview

Opal now has two new file methods - ZIPFILE & UNZIPFILE.....

◆ Opal Interface

Opal now has two new file methods - ZIPFILE & UNZIPFILE.....