FORM Chunk

See more on Chunks in general.

This specifies details for a Transformation Algorithm.

Flags

Flagusage
a (correlated) Cleared.
b (subtype) May be set or cleared. The FORM chunk meaning is dependant on the Subtype, and no Subtype at all is also a defined variety.
r (range of instances) all used in the general manner.
p (multi-part) & c
y (payload specification)
i (instance sizes) Cleared.
n (pointer) Cleared.
FORM-n and FORM-nd have distinct meanings, generalized from COMP-n, COMP-nd, CRYP-n, CRYP-nd, etc.
d (redundant)

Although the y (payload specification) is allowed, it may not refer to itself (through an extended payload specification)! Generally, compressing this chunk is pointless, so any use of the y flag will probably be for other unrelated purposes, such as data-integrety of this critical information.

Subtype

Different Subtypes are used for different types of algorithms. The COMP and CRYP chunks are simply subtypes of FORM that have been given their own name. But, the same concept works for any subtype.

The algorithm type value in an Extended Payload Specification will match the Subtype of the FORM chunk.

FORM algorithm types
algorithm typedescription
64Decompression algorithms
65Decryption algorithms
66Fault-Tolerance algorithms
67Utility algorithms
...others added as people think of them

Without any Subtype, the FORM chunk is used to define an Extended Payload Specification. This is detailed below.

Instance Number

When a Subtype is present, the Instance Number is matched against the algorithm id value in an Extended Payload Specification record whose algorithm type matches the FORM’s Subtype. If the subtype is COMP or CRYP, it is also matched by the corresponding slot in the basic Payload Specification.

With no Subtype, the Instance Number is matched against the payload extension parameter in an Payload Specification.

Reserved and Predefined Instance Numbers

Instance numbers from hex 40 through hex FFF (64 through 4095) are reserved. An archive shall not contain instances in this range.

FORM-b Chunk Payload - with Subtype

The Payload of a FORM chunk contains parameters for performing a transformation on some other chunk’s payload.

The payload is a list of records.

The record begins with a uintV indicating the algorithm number, which is local to each Subtype. This is followed by any parameters needed to configure that transformation, and vary by algorithm.

If more than one record is present, each is performed in turn (see examples).

FORM-b Chunk Payload - Extended Payload Specification

The Payload of a FORM chunk (without the b flag set) is a list of transformations to perform on some chunk’s payload. This is basically an Extended Payload Specification that’s not limited to one slot for a decompression algorithm and one slot for a decryption algorithm. Instead, you can have any type of transformation algorithms and perform them in any order.

The payload is a list of records.

Each record contains two uintV’s indicating an algorithm type and the Instance Number of a FORM chunk of that Subtype. The transformations are performed in the order listed, when extracting the file.

So, a regular Payload Specification of (x,y) is the same as the Extended Payload Specification of (65,y, 64,x).

Examples


Valid HTML 4.01!

Page content copyright 2003 by John M. Dlugosz. Home:http://www.dlugosz.com, email:mailto:john@dlugosz.com