Skip to main content
Skip table of contents

Zip Converter

This adapter compresses and decompresses data into a ZIP archive.

Properties

Operation

Defines the operation executed by the adapter.

Possible values:

  • Zip: Compresses the provided input in a zip file. Encryption and compression settings can be set.

    Required parameters

    Parameters SourcePath or InputName are required for this operation.

  • Unzip: Decompresses the provided input to the specified location. Password protected files can also be decompressed.

Parameter

Adapter

Main class of the adapter (Do not change!)

Possible values: de.softproject.x4.adapter.zipconverter.ZipConverter: Main class (default)

sourcePath

File system path to the file to be compressed/decompressed.

Possible values:

  • File system path

If this parameter is not set, the file is provided by the adapter input. In this case parameter inputName is required for operation Zip.

targetPath

File system path to the memory location where the output is to be stored ("target file system").

Possible values:

  • File system path

If this parameter is not set, the file is provided by the adapter output.

overwrite

Defines if existing files with the same name should be overwritten.

Possible values:

  • Checked

    • If mergeContent is enabled, the output is an error, because the file can not be processed.
    • If mergeContent is disabled, the existing file is overwritten.
  • Unchecked

    • If mergeContent is enabled, the files are merged.
    • If mergeContent is disabled, the output is an error, because the file can not be processed.
mergeContent

Defines if existing files with the same name should be merged.

Possible values:

  • Checked

    • If overwrite is enabled, the output is an error, because the file can not be processed..
    • If overwrite is disabled, the files are merged.
  • Unchecked

    • If overwrite is enabled, the existing file is overwritten.
    • If overwrite is disabled, the output is an error, because the file can not be processed.
inputName

Name of the input file. Is used if parameter sourcePath is not set.

Possible values:

  • File name of the file, that should be received as input or provided as output.
encryptedFiles

Defines if encrypted files should be processed in the operation. With operation Zip, the zip file output is password protected, with operation Unzip, a password is required for unzipping.

Possible values:

  • Checked / Unchecked
password

Password for encrypted files.

Possible values: Any string

encryptionMethod

Defines which encryption method is used for zipping when encryptedFiles is checked.

Possible values:

  • No encryption: Do not use encryption when zipping.
  • AES: Use AES encryption algorithm (Key size: 256 Bit)
  • Standard: Use standard encryption algorithm
compressionMethod

Definies which compression algorithm is used for zipping.

Possible values:

  • Deflate (Default): Lossless compression using a combination of the LZ77 algorithm and Huffmann encoding. Please find more information on this compression level here and here.

    If Deflate is selected, the compression level can be specified with CompressionLevel.

  • Store: Data is not compressed, but packed into a single file.

    This option is useful when multiple data/folders are to be sent/received and the file size can be neglected. No time is needed for packaging.

compressionLevel

Defines which compression algorithm when zipping if Deflate is selected for compressionMethod.

Possible values:

  • Fastest: Lowest compression level, but very fast compression
  • Fast: Low compression level, but fast compression
  • Normal (Default): Optimum ratio between compression level and speed
  • Maximum: High compression level, but slow compression
  • Ultra: Hightest compression level, but very slow compression

Status values

1

The operation was executed successfully.

-1An error occurred during the operation's execution.

Input

The adapter expects input with following structure:

  • Both operations (Zip / Unzip) are able to work with two different places of origin or target.
    • Input/Output
    • File system path for Input/Output
  • Based on these two possibilities, different inputs can be used for both operations:
    • Parameter sourcePath is set: Input from the directory specified in the file system path.
    • Parameter sourcePath is not set: Input of the parameter
  • Based on these two possibilities, different outputs can be used for both operations:
    • Parameter targetPath is set: The result of the operation is stored in the location specified as file system path.
    • Parameter targetPath is not set:
      • An XML file with one entry for each input file contained in the input zip file is output.
      • The contents of the zip file are stored in the location specified as the directory path.

Output

Depending on the executed operation, the adapter returns different kinds of documents.

  • Operation Zip without targetPath: Zip file is provided in adapter output.
  • Operation Zip with targetPath: Zip file is stored in the target directory.
  • Operation Unzip without targetPath: An XML file that contains the various files within the zip file is provided in the adapter output. The XML file has the following structure: 

    Sample output for operation Unzip

    XML
    <?xml version="1.0" encoding="UTF-8" ?>
    <Zip>
    	<File size="209" name="testToZip.xml" comment="...">PD94bWwgdmVyc2lvgj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPFJvb3RFbGVtZW50P</File>
    </Zip>
  • Operation Unzip with targetPath: The content of the zip file is stored in the target directory. 
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.