Product Documentation

c-treeRTG COBOL Edition User's Guide

Previous Topic

Next Topic

<keycompress>

The keycompress option indicates whether to create files with key compression enabled. This feature is turned off by default. It may impact performance but reduces disk space usage.

Accepted Values

Value

Effect

Synonyms

yes

Turns on key compression combining both leading character and padding compression. This provides the maximum key compression.

y, true, on, 1

no

Turns off key compression.

n, false, off, 0

Attributes

Value

Effect

Synonyms

vlennod

Causes new files to be created with the new variable-length "vlennod" index node format. See the note below "Vlennod Index Node Format." Enabled by default.

 

Additionally, the keycompress option may accept the following sub-options to specify which compression type to use:

<rle> keycompress option

  • Indicates to compress the whole key using a simple RLE algorithm. This option is available only if vlennod is enabled.

<leading> keycompress option

  • Indicates to compress the leading characters of key values. The <keycompress vlennod> attribute must be disabled to use <leading>. See <leading>.

<padding> keycompress option

  • Indicates to compress the padding characters of key values.

Note: The <rle> and <padding> sub-options are mutually exclusive.

vlennod Index Node Format

Setting vlennod to "yes" causes new files to be created with the new index node format. The new index node format is variable-length hence the name "vlennod". The variable-length nature of the new index nodes allows better index compression. The vlennod attribute is enabled by default.

The following <keycompress> suboptions specify which compression type to use:

  • <rle> - Indicates to compress the whole key using a simple RLE algorithm.
  • <padding> - Indicates to compress the padding characters of the key.

The new index compression does not support the <leading> compression type. The old index compression can be used by disabling <keycompress vlennod> (enabled by default), which allows the <leading> and <padding> to be specified. The new <rle> option cannot be specified when the <keycompress vlennod> attribute is disabled. The <rle> and <padding> sub-options are mutually exclusive unlike the old index compression where it was possible to combine <leading> and <padding>.

Examples

The following examples show different ways to turn on the new index compression:

<keycompress/>

<keycompress>1</keycompress>

<keycompress><rle/></keycompress>

<keycompression><padding>1</padding></keycompression>

The following example turns on default key compression that implicitly uses RLE compression:

<keycompress>yes</keycompress>

The following example turns on only padding key compression:

<keycompress>

<padding>yes</padding>

</keycompress>

The following example turns off key compression:

<keycompress>no<keycompress>

Using the Old-Style Compression

In some cases, older c-treeRTG versions that do not support the new vlennod index node format are in production and cannot be updated. The vlennod index node format can be disabled in these cases. This allows creation of compressed files in the old compression format so they are compatible with the old RTG version.

The old index compression can be used for file creation by disabling the <keycompress vlennod> attribute, which is enabled by default. When the <keycompress vlennod> attribute is disabled, the old index compression sub-options <leading> and <padding> can be specified. The new <rle> option cannot be specified when the <keycompress vlennod> attribute is disabled. The following examples show different ways to enable the old index compression:

<keycompress vlennod="no"/>

<keycompress vlennod="0">1</keycompress>

<keycompress vlennod="false"><leading>1</leading></keycompress>

<keycompression vlennod="n"><leading/><padding/></keycompression>

In This Section

<rle>

<leading>

<padding>

TOCIndex