Compressor

Usage

The Compressor module allows you to compress input messages and unpack compressed messages.

Compressing Multiple Files in a Zip Archive

By using the Compressor, you can compress multiple files.

Prerequisites

The files are stored in a directory in the file system.

Proceed as follows

  1. Create the following Technical Workflow:

    module guide 1239 1

    The File Input Connector reads the directory, the Compressor compresses the directory and the File Output Connector writes the resulting zip archive into the file system.

  2. Configure the File Input Connector as follows:

    • The directory mode is selected.

    • Data transfer = IBISDirectory-Xml

    • At XML configuration Encoding = UTF-8 is selected and the options inclusive data and Encode data base64 are checked.

  3. In the Compressor select the following options:

    • Action = Zip

    • Input format = IBISDirectory XML

  4. When configuring the File Output Connector select Data as input format.

Compressor/Decompressor Properties Dialog in the Compressor

This dialog offers the following options:

Settings

  • Action

    Select one of the following actions:

  • Compress data

    The input message will be compressed.

  • Decompress data

    The input message will be decompressed. An exception is thrown if an input message cannot be identified as Zip/GZip or cannot be decompressed.

  • List content

    The input message will be introspected and will output the name and path information of each file contained in the compressed file in IBISDirectory XML format.

  • Algorithm

    • Zip

      For compressing directories and their files and for listing the contents of the compressed file.

    • Gzip

      For compressing single files.

      If, while using Gzip, a file name and/or a file date is found in the file, these are read and are output as variables ReadFileName and ReadFileDate.

    • 7Zip

      For compressing, decompressing, and for listing the contents of the compressed file.

      Using the 7z algorithm, both data and xml files can be given as input (Input format: Data).

  • Input format

    • Data (for action = Compress data and List content)

      Check this option for all formats except IBISDirectoryXML.

    • IBISDirectory XML (for action = Compress data)

      If your messages are formatted as specified, enable this option to compress them correctly.

  • Output format (for action = Decompress data)

    • Data

      Check this option for all formats except IBISDirectoryXML.

    • IBISDirectory XML

      If your messages are formatted as specified, enable this option to decompress them correctly.

  • Ignore uncompressed Data (for action = Decompress data)

    If selected non-compressed data will be ignored for decompression.

Zip options

(only for algorithm = zip and action = Compress/Decompress data )

  • File name encoding

    The encoding of the file name must be identical to the encoding of the archive. If the two encodings are not identical, file names are possibly not found that contain characters outside the US-ASCII character set (like umlauts, etc.).

  • File name inside zip archive

    • When compressing:

      File name within the ZIP file that the compressor generates. If no file name is specified, IBISData is used as the default name.

    • When decompressing:

      Name and file extension of the file to be decompressed and the folder in which it is located.

      <folder>/<filename.extension>

  • Comment for zip archive

    Comment

  • Password

    Selecting the checkbox activates the password field. The entered password is requested before decompressing the file.