# ZipStream Class

The ZipStream class is used to perform compression or decompression.

## Syntax

```text
ipworkszip.ZipStream
```

## Remarks

The ZipStream class provides a way to compress and decompress streamed data.

Data may be operated on in multiple ways as discussed below. The [StreamFormat](#streamformat-property-zipstream-class) property specifies the algorithm to us. Possible values are:

- Deflate
- Zlib
- Gzip

**Compression and Decompression Streams**

The [GetDecompressionStream](#getdecompressionstream-method-zipstream-class) and [GetCompressionStream](#getcompressionstream-method-zipstream-class) methods are used to retrieve streams that read or write compressed data, as appropriate; the underlying stream should be passed to either method as a parameter.

**CompressBlock and DecompressBlock**

The [CompressBlock](#compressblock-method-zipstream-class) and [DecompressBlock](#decompressblock-method-zipstream-class) methods operate on blocks (chunks) of data. The methods may be used to compress and decompress data as it becomes available.

Note that when using blocks of data the [OutputData](#outputdata-property-zipstream-class) property is not applicable. Instead data is made available through the [CompressedData](#compresseddata-event-zipstream-class) and [DecompressedData](#decompresseddata-event-zipstream-class) events.

If all data is available ahead of time [CompressData](#compressdata-method-zipstream-class) and [DecompressData](#decompressdata-method-zipstream-class) may be called instead.

### Compress Data

Set [InputData](#inputdata-property-zipstream-class) to the current block to be compressed. Next call [CompressBlock](#compressblock-method-zipstream-class) to compress the current block. Note that [CompressBlock](#compressblock-method-zipstream-class) takes a *LastBlock* parameter. If the block of data is the final block to be compressed set this to True. For all other blocks set this to False.

During compression the [CompressedData](#compresseddata-event-zipstream-class) event will fire with the compressed data. Note that this event may not fire for every call to [CompressBlock](#compressblock-method-zipstream-class) due to the way the compression algorithm operates. For example:

```text
zipstream.InputDataB = MyDecompressedData;
zipstream.CompressBlock();
```

 Data is accumulated inside the [CompressedData](#compresseddata-event-zipstream-class) event:

```text
private static void Zipstream_OnCompressedData(object sender, ZipstreamCompressedDataEventArgs e)
{
  DoSomethingWith(e.DataB);
}
```

Note that [OutputData](#outputdata-property-zipstream-class) is not applicable when compressing block data.

### Decompress Data

Set [InputData](#inputdata-property-zipstream-class) to the current block to be decompressed. Next call [DecompressBlock](#decompressblock-method-zipstream-class) to decompress the current block.

During decompression the [DecompressedData](#decompresseddata-event-zipstream-class) event will fire with the decompressed data. Note that this event may not fire for every call to [DecompressBlock](#decompressblock-method-zipstream-class) due to the way the decompression algorithm operates. For example:

```text
zipstream.InputDataB = MyCompressedData;
zipstream.DecompressBlock();
```

 Data is accumulated inside the [DecompressedData](#decompresseddata-event-zipstream-class) event:

```text
private static void Zipstream_OnDecompressedData(object sender, ZipstreamDecompressedDataEventArgs e)
{
  DoSomethingWith(e.DataB);
}
```

Note that [OutputData](#outputdata-property-zipstream-class) is not applicable when decompressing block data.

**CompressData and DecompressData**

The [CompressData](#compressdata-method-zipstream-class) and [DecompressData](#decompressdata-method-zipstream-class) methods operate on the complete blob of data. The entire compressed or decompressed data must be set to [InputData](#inputdata-property-zipstream-class) before calling either method.

To compress and decompress data in blocks (chunks) see [CompressBlock](#compressblock-method-zipstream-class) and [DecompressBlock](#decompressblock-method-zipstream-class).

### Compress Data

Set [InputData](#inputdata-property-zipstream-class) to the decompressed data. This should be the entire data to be compressed. Next call [CompressData](#compressdata-method-zipstream-class). After compression [OutputData](#outputdata-property-zipstream-class) will hold the compressed data. For example:

```text
zipstream.InputDataB = MyDecompressedData;
zipstream.CompressData();
MyCompressedData = zipstream.OutputDataB;
```

In addition to [OutputData](#outputdata-property-zipstream-class), the compressed data may also be accumulated within the [CompressedData](#compresseddata-event-zipstream-class) event.

### Decompress Data

Set [InputData](#inputdata-property-zipstream-class) to the compressed data. This should be the entire data to be decompressed. Next call [DecompressData](#decompressdata-method-zipstream-class). After decompression [OutputData](#outputdata-property-zipstream-class) will hold the decompressed data. For example:

```text
zipstream.InputDataB = MyCompressedData;
zipstream.DecompressData();
MyDecompressedData = zipstream.OutputDataB;
```

In addition to [OutputData](#outputdata-property-zipstream-class), the compressed data may also be accumulated within the [DecompressedData](#decompresseddata-event-zipstream-class) event.

## Property List

*The following is the full list of the properties of the class with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [CloseBaseStream](#closebasestream-property-zipstream-class) | Whether or not to close the underlying stream. |
| [CompressionLevel](#compressionlevel-property-zipstream-class) | The compression level to use. |
| [InputData](#inputdata-property-zipstream-class) | Specifies the data to compress or decompress. |
| [OutputData](#outputdata-property-zipstream-class) | The output data after compression or decompression. |
| [StreamFormat](#streamformat-property-zipstream-class) | The stream format to use. |

## Method List

*The following is the full list of the methods of the class with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [CompressBlock](#compressblock-method-zipstream-class) | Compresses a block of data. |
| [CompressData](#compressdata-method-zipstream-class) | Compresses the specified data. |
| [Config](#config-method-zipstream-class) | Sets or retrieves a configuration setting. |
| [DecompressBlock](#decompressblock-method-zipstream-class) | Decompresses a block of data. |
| [DecompressData](#decompressdata-method-zipstream-class) | Decompresses the specified data. |
| [GetCompressionStream](#getcompressionstream-method-zipstream-class) | Creates an output stream used to write compressed data. |
| [GetDecompressionStream](#getdecompressionstream-method-zipstream-class) | Creates an input stream used to read data from a compressed stream. |
| [Reset](#reset-method-zipstream-class) | Resets the class. |

## Event List

*The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [CompressedData](#compresseddata-event-zipstream-class) | This event fires with compressed data. |
| [DecompressedData](#decompresseddata-event-zipstream-class) | This event fires with decompressed data. |
| [Error](#error-event-zipstream-class) | Information about errors during data delivery. |

## Config Settings

*The following is a list of config settings for the class with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [BuildInfo](#BuildInfo) | Information about the product's build. |
| [GUIAvailable](#GUIAvailable) | Whether or not a message loop is available for processing events. |
| [LicenseInfo](#LicenseInfo) | Information about the current license. |
| [MaskSensitiveData](#MaskSensitiveData) | Whether sensitive data is masked in log messages. |
| [UseDaemonThreads](#UseDaemonThreads) | Whether threads created by the class are daemon threads. |
| [UseInternalSecurityAPI](#UseInternalSecurityAPI) | Whether or not to use the system security libraries or an internal implementation. |
| [UseVirtualThreads](#UseVirtualThreads) | Whether threads created by the class use virtual threads instead of platform threads. |

# CloseBaseStream Property ([ZipStream](#zipstream-class) Class)

Whether or not to close the underlying stream.

## Syntax

```text
public boolean isCloseBaseStream();
public void setCloseBaseStream(boolean closeBaseStream);
```

## Default Value

True

## Remarks

If true, streams created by [GetCompressionStream](#getcompressionstream-method-zipstream-class) and [GetDecompressionStream](#getdecompressionstream-method-zipstream-class) will close their underlying streams when their *Close* method is invoked. If false, the underlying streams will remain open.

# CompressionLevel Property ([ZipStream](#zipstream-class) Class)

The compression level to use.

## Syntax

```text
public int getCompressionLevel();
public void setCompressionLevel(int compressionLevel);
```

## Default Value

4

## Remarks

The compression level to use, from 1 to 6. Higher values will cause the component to compress better; lower values will cause the component to compress faster.

When [GetCompressionStream](#getcompressionstream-method-zipstream-class) is invoked the stream will be created with the specified compression level. After a stream has been created it is independent of the control, and changing CompressionLevel will have no effect on existing streams.

# InputData Property ([ZipStream](#zipstream-class) Class)

Specifies the data to compress or decompress.

## Syntax

```text
public byte[] getInputData();
public void setInputData(byte[] inputData);
```

## Default Value

""

## Remarks

This property specifies the data to compress or decompress.

When decompressing this should be set to the compressed data before calling [DecompressData](#decompressdata-method-zipstream-class) or [DecompressBlock](#decompressblock-method-zipstream-class).

When compressing this should be set to the decompressed data before calling [CompressData](#compressdata-method-zipstream-class) or [CompressBlock](#compressblock-method-zipstream-class).

When performing operations on multiple chunks of data, note that this property is not automatically cleared after each operation.

# OutputData Property ([ZipStream](#zipstream-class) Class)

The output data after compression or decompression.

## Syntax

```text
public byte[] getOutputData();
```

## Default Value

""

## Remarks

This property holds the compressed or decompressed data after [CompressData](#compressdata-method-zipstream-class) or [DecompressData](#decompressdata-method-zipstream-class) is called.

This property is not applicable when calling [CompressBlock](#compressblock-method-zipstream-class) or [DecompressBlock](#decompressblock-method-zipstream-class).

This property is read-only and not available at design time.

# StreamFormat Property ([ZipStream](#zipstream-class) Class)

The stream format to use.

## Syntax

```text
public int getStreamFormat();
public void setStreamFormat(int streamFormat);

Enumerated values:
  public final static int sfDeflate = 0;
  public final static int sfZlib = 1;
  public final static int sfGzip = 2;
```

## Default Value

0

## Remarks

The stream format to use, by default **Deflate**.

All three stream formats use the **Deflate** algorithm specified in RFC 1951, which is the same algorithm used by **Zip**. The **Zlib** stream format adds a two-byte header and an Adler-32 checksum; the **Gzip** format adds a longer header and a CRC checksum, and is identical to the **Gzip** file format.

*Caution*: The terms *zlib* and *deflate* are sometimes used interchangeably (which is technically incorrect).

# CompressBlock Method ([ZipStream](#zipstream-class) Class)

Compresses a block of data.

## Syntax

```text
public void compressBlock(boolean lastBlock);
```

## Remarks

This method compresses the block of data specified by [InputData](#inputdata-property-zipstream-class).

The CompressBlock and [DecompressBlock](#decompressblock-method-zipstream-class) methods operate on blocks (chunks) of data. The methods may be used to compress and decompress data as it becomes available.

Note that when using blocks of data the [OutputData](#outputdata-property-zipstream-class) property is not applicable. Instead data is made available through the [CompressedData](#compresseddata-event-zipstream-class) and [DecompressedData](#decompresseddata-event-zipstream-class) events.

If all data is available ahead of time [CompressData](#compressdata-method-zipstream-class) and [DecompressData](#decompressdata-method-zipstream-class) may be called instead.

### Compress Data

Set [InputData](#inputdata-property-zipstream-class) to the current block to be compressed. Next call CompressBlock to compress the current block. Note that CompressBlock takes a *LastBlock* parameter. If the block of data is the final block to be compressed set this to True. For all other blocks set this to False.

During compression the [CompressedData](#compresseddata-event-zipstream-class) event will fire with the compressed data. Note that this event may not fire for every call to CompressBlock due to the way the compression algorithm operates. For example:

```text
zipstream.InputDataB = MyDecompressedData;
zipstream.CompressBlock();
```

 Data is accumulated inside the [CompressedData](#compresseddata-event-zipstream-class) event:

```text
private static void Zipstream_OnCompressedData(object sender, ZipstreamCompressedDataEventArgs e)
{
  DoSomethingWith(e.DataB);
}
```

Note that [OutputData](#outputdata-property-zipstream-class) is not applicable when compressing block data.

### Decompress Data

Set [InputData](#inputdata-property-zipstream-class) to the current block to be decompressed. Next call [DecompressBlock](#decompressblock-method-zipstream-class) to decompress the current block.

During decompression the [DecompressedData](#decompresseddata-event-zipstream-class) event will fire with the decompressed data. Note that this event may not fire for every call to [DecompressBlock](#decompressblock-method-zipstream-class) due to the way the decompression algorithm operates. For example:

```text
zipstream.InputDataB = MyCompressedData;
zipstream.DecompressBlock();
```

 Data is accumulated inside the [DecompressedData](#decompresseddata-event-zipstream-class) event:

```text
private static void Zipstream_OnDecompressedData(object sender, ZipstreamDecompressedDataEventArgs e)
{
  DoSomethingWith(e.DataB);
}
```

Note that [OutputData](#outputdata-property-zipstream-class) is not applicable when decompressing block data.

# CompressData Method ([ZipStream](#zipstream-class) Class)

Compresses the specified data.

## Syntax

```text
public void compressData();
```

## Remarks

This method compresses the data specified by [InputData](#inputdata-property-zipstream-class). After calling this method [OutputData](#outputdata-property-zipstream-class) holds the compressed data.

The CompressData and [DecompressData](#decompressdata-method-zipstream-class) methods operate on the complete blob of data. The entire compressed or decompressed data must be set to [InputData](#inputdata-property-zipstream-class) before calling either method.

To compress and decompress data in blocks (chunks) see [CompressBlock](#compressblock-method-zipstream-class) and [DecompressBlock](#decompressblock-method-zipstream-class).

### Compress Data

Set [InputData](#inputdata-property-zipstream-class) to the decompressed data. This should be the entire data to be compressed. Next call CompressData. After compression [OutputData](#outputdata-property-zipstream-class) will hold the compressed data. For example:

```text
zipstream.InputDataB = MyDecompressedData;
zipstream.CompressData();
MyCompressedData = zipstream.OutputDataB;
```

In addition to [OutputData](#outputdata-property-zipstream-class), the compressed data may also be accumulated within the [CompressedData](#compresseddata-event-zipstream-class) event.

### Decompress Data

Set [InputData](#inputdata-property-zipstream-class) to the compressed data. This should be the entire data to be decompressed. Next call [DecompressData](#decompressdata-method-zipstream-class). After decompression [OutputData](#outputdata-property-zipstream-class) will hold the decompressed data. For example:

```text
zipstream.InputDataB = MyCompressedData;
zipstream.DecompressData();
MyDecompressedData = zipstream.OutputDataB;
```

In addition to [OutputData](#outputdata-property-zipstream-class), the compressed data may also be accumulated within the [DecompressedData](#decompresseddata-event-zipstream-class) event.

# Config Method ([ZipStream](#zipstream-class) Class)

Sets or retrieves a configuration setting.

## Syntax

```text
public String config(String configurationString);
```

## Remarks

Config is a generic method available in every class. It is used to set and retrieve [configuration settings](#config-settings-zipstream-class) for the class.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these *internal properties* is provided through the Config method.

To set a configuration setting named *PROPERTY*, you must call *Config("PROPERTY=VALUE")*, where *VALUE* is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a [configuration setting](#config-settings-zipstream-class), you must call *Config("PROPERTY")*. The value will be returned as a string.

# DecompressBlock Method ([ZipStream](#zipstream-class) Class)

Decompresses a block of data.

## Syntax

```text
public void decompressBlock();
```

## Remarks

This method decompresses the block of data specified by [InputData](#inputdata-property-zipstream-class).

The [CompressBlock](#compressblock-method-zipstream-class) and DecompressBlock methods operate on blocks (chunks) of data. The methods may be used to compress and decompress data as it becomes available.

Note that when using blocks of data the [OutputData](#outputdata-property-zipstream-class) property is not applicable. Instead data is made available through the [CompressedData](#compresseddata-event-zipstream-class) and [DecompressedData](#decompresseddata-event-zipstream-class) events.

If all data is available ahead of time [CompressData](#compressdata-method-zipstream-class) and [DecompressData](#decompressdata-method-zipstream-class) may be called instead.

### Compress Data

Set [InputData](#inputdata-property-zipstream-class) to the current block to be compressed. Next call [CompressBlock](#compressblock-method-zipstream-class) to compress the current block. Note that [CompressBlock](#compressblock-method-zipstream-class) takes a *LastBlock* parameter. If the block of data is the final block to be compressed set this to True. For all other blocks set this to False.

During compression the [CompressedData](#compresseddata-event-zipstream-class) event will fire with the compressed data. Note that this event may not fire for every call to [CompressBlock](#compressblock-method-zipstream-class) due to the way the compression algorithm operates. For example:

```text
zipstream.InputDataB = MyDecompressedData;
zipstream.CompressBlock();
```

 Data is accumulated inside the [CompressedData](#compresseddata-event-zipstream-class) event:

```text
private static void Zipstream_OnCompressedData(object sender, ZipstreamCompressedDataEventArgs e)
{
  DoSomethingWith(e.DataB);
}
```

Note that [OutputData](#outputdata-property-zipstream-class) is not applicable when compressing block data.

### Decompress Data

Set [InputData](#inputdata-property-zipstream-class) to the current block to be decompressed. Next call DecompressBlock to decompress the current block.

During decompression the [DecompressedData](#decompresseddata-event-zipstream-class) event will fire with the decompressed data. Note that this event may not fire for every call to DecompressBlock due to the way the decompression algorithm operates. For example:

```text
zipstream.InputDataB = MyCompressedData;
zipstream.DecompressBlock();
```

 Data is accumulated inside the [DecompressedData](#decompresseddata-event-zipstream-class) event:

```text
private static void Zipstream_OnDecompressedData(object sender, ZipstreamDecompressedDataEventArgs e)
{
  DoSomethingWith(e.DataB);
}
```

Note that [OutputData](#outputdata-property-zipstream-class) is not applicable when decompressing block data.

# DecompressData Method ([ZipStream](#zipstream-class) Class)

Decompresses the specified data.

## Syntax

```text
public void decompressData();
```

## Remarks

This method decompresses the data specified by [InputData](#inputdata-property-zipstream-class). After calling this method [OutputData](#outputdata-property-zipstream-class) holds the decompressed data.

The [CompressData](#compressdata-method-zipstream-class) and DecompressData methods operate on the complete blob of data. The entire compressed or decompressed data must be set to [InputData](#inputdata-property-zipstream-class) before calling either method.

To compress and decompress data in blocks (chunks) see [CompressBlock](#compressblock-method-zipstream-class) and [DecompressBlock](#decompressblock-method-zipstream-class).

### Compress Data

Set [InputData](#inputdata-property-zipstream-class) to the decompressed data. This should be the entire data to be compressed. Next call [CompressData](#compressdata-method-zipstream-class). After compression [OutputData](#outputdata-property-zipstream-class) will hold the compressed data. For example:

```text
zipstream.InputDataB = MyDecompressedData;
zipstream.CompressData();
MyCompressedData = zipstream.OutputDataB;
```

In addition to [OutputData](#outputdata-property-zipstream-class), the compressed data may also be accumulated within the [CompressedData](#compresseddata-event-zipstream-class) event.

### Decompress Data

Set [InputData](#inputdata-property-zipstream-class) to the compressed data. This should be the entire data to be decompressed. Next call DecompressData. After decompression [OutputData](#outputdata-property-zipstream-class) will hold the decompressed data. For example:

```text
zipstream.InputDataB = MyCompressedData;
zipstream.DecompressData();
MyDecompressedData = zipstream.OutputDataB;
```

In addition to [OutputData](#outputdata-property-zipstream-class), the compressed data may also be accumulated within the [DecompressedData](#decompresseddata-event-zipstream-class) event.

# GetCompressionStream Method ([ZipStream](#zipstream-class) Class)

Creates an output stream used to write compressed data.

## Syntax

```text
public java.io.OutputStream getCompressionStream(java.io.OutputStream baseStream);
```

## Remarks

GetCompressionStream returns a *java.io.OutputStream* used to compress data as it is written to an underlying stream. The *BaseStream* parameter should be the *java.io.OutputStream* to which the compressed data will be written.

The format (**zlib** or **gzip**) is selected with the [StreamFormat](#streamformat-property-zipstream-class) property; **Deflate** is the default. Note that the stream, once created, is independent of the class.

The return value provides the following standard *java.io.OutputStream* methods. Please see the official Java documentation for details.

public void close() throws IOException

Closes the stream. Also closes *BaseStream if* [CloseBaseStream](#closebasestream-property-zipstream-class) *is set to true* before this stream is created.

public void flush() throws IOException

Flushes the output stream, and forces all data to be compressed and written to the underlying stream. *Caution: Flush only when necessary, as repeated flushing may degrade the compression ratio.*

public void write(int b) throws IOException

Compresses and writes the byte *b* to the underlying stream.

public void write(byte[] b) public void write(byte[] b, int off, int len)

Compresses and writes the byte array *b* to the underlying stream.

# GetDecompressionStream Method ([ZipStream](#zipstream-class) Class)

Creates an input stream used to read data from a compressed stream.

## Syntax

```text
public java.io.InputStream getDecompressionStream(java.io.InputStream baseStream);
```

## Remarks

GetDecompressionStream returns a *java.io.InputStream* used to read the decompressed data from a compressed stream. The *BaseStream* parameter should be the *java.io.InputStream* providing the compressed data.

The format (**zlib** or **gzip**) is selected with the [StreamFormat](#streamformat-property-zipstream-class) property; **Deflate** is the default. Note that the stream, once created, is independent of the class.

The return value provides the following standard *java.io.InputStream* methods. Please see the official Java documentation for details.

public void close() throws IOException

Closes the stream. Also closes *BaseStream if* [CloseBaseStream](#closebasestream-property-zipstream-class) *is set to true* before this stream is created.

public int read() throws IOException

Reads a single byte of data from the input stream. Returns -1 if no data was able to be read.

public int read(byte[] b) throws IOException public int read(byte[] b, int off, int len) throws IOException

Reads decompressed data into the provided byte array, and returns the number of bytes actually read. Returns -1 if the stream was finished.

public long skip(long n) throws IOException

Attempts to skip *n* bytes of (decompressed) data, and returns the number of bytes actually skipped.

Other methods (such as *reset*) are defined, but do nothing special, and will return default values or throw exceptions as defined by the Java API.

# Reset Method ([ZipStream](#zipstream-class) Class)

Resets the class.

## Syntax

```text
public void reset();
```

## Remarks

Reset resets the state of the class. All properties will be set to their default values, and any files open will be closed.

# CompressedData Event ([ZipStream](#zipstream-class) Class)

This event fires with compressed data.

## Syntax

```text
public class DefaultZipStreamEventListener implements ZipStreamEventListener {
  ...
  public void compressedData(ZipStreamCompressedDataEvent e) {}
  ...
}

public class ZipStreamCompressedDataEvent {
  public byte[] data;
}
```

## Remarks

The CompressedData event fires as compressed data is available when [CompressData](#compressdata-method-zipstream-class) or [CompressBlock](#compressblock-method-zipstream-class) is called. This may fire one or more times when data is compressed.

*Data* holds the current block of compressed data.

# DecompressedData Event ([ZipStream](#zipstream-class) Class)

This event fires with decompressed data.

## Syntax

```text
public class DefaultZipStreamEventListener implements ZipStreamEventListener {
  ...
  public void decompressedData(ZipStreamDecompressedDataEvent e) {}
  ...
}

public class ZipStreamDecompressedDataEvent {
  public byte[] data;
}
```

## Remarks

The DecompressedData event fires as compressed data is available when [DecompressData](#decompressdata-method-zipstream-class) or [DecompressBlock](#decompressblock-method-zipstream-class) is called. This may fire one or more times as data is decompressed.

*Data* holds the current block of decompressed data.

# Error Event ([ZipStream](#zipstream-class) Class)

Information about errors during data delivery.

## Syntax

```text
public class DefaultZipStreamEventListener implements ZipStreamEventListener {
  ...
  public void error(ZipStreamErrorEvent e) {}
  ...
}

public class ZipStreamErrorEvent {
  public int errorCode;
  public String description;
}
```

## Remarks

The Error event is fired in case of exceptional conditions during message processing. Normally the class throws an exception.

*ErrorCode* contains an error code and *Description* contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the [Error Codes](#trappable-errors-zipstream-class) section.

# Config Settings ([ZipStream](#zipstream-class) Class)

 The class accepts one or more of the following *configuration settings*. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these *internal properties* is provided through the [Config](#config-method-zipstream-class) method.

*No configuration settings defined.*

### Base Config Settings

**BuildInfo**: Information about the product's build.When queried, this setting will return a string containing information about the product's build.

**GUIAvailable**: Whether or not a message loop is available for processing events.In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The class will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications, an invalid message loop may be discovered that will result in errant behavior. In these cases, setting [GUIAvailable](#GUIAvailable) to *false* will ensure that the class does not attempt to process external events.

**LicenseInfo**: Information about the current license.When queried, this setting will return a string containing information about the license this instance of a class is using. It will return the following information:

- Product: The product the license is for.
- Product Key: The key the license was generated from.
- License Source: Where the license was found (e.g., RuntimeLicense, License File).
- License Type: The type of license installed (e.g., Royalty Free, Single Server).
- Last Valid Build: The last valid build number for which the license will work.

**MaskSensitiveData**: Whether sensitive data is masked in log messages.In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to *true* to mask sensitive data. The default is *true*.

**UseDaemonThreads**: Whether threads created by the class are daemon threads.If set to True (default), when the class creates a thread, the thread's Daemon property will be explicitly set to True. When set to False, the class will not set the Daemon property on the created thread. The default value is True.

**UseInternalSecurityAPI**: Whether or not to use the system security libraries or an internal implementation. When set to *false*, the class will use the system security libraries by default to perform cryptographic functions where applicable.

Setting this configuration setting to *true* tells the class to use the internal implementation instead of using the system security libraries.

 This setting is set to *false* by default on all platforms.

**UseVirtualThreads**: Whether threads created by the class use virtual threads instead of platform threads.If set to *true*, when the class creates a thread, it will be created as a virtual thread instead of a platform thread. Virtual threads are lightweight threads managed by the JVM that are multiplexed onto a small pool of carrier threads, significantly reducing memory usage and platform thread count under high-concurrency workloads. Requires Java 24 or later. The default value is *false*.

# Trappable Errors ([ZipStream](#zipstream-class) Class)

 Note that the streams returned by [GetCompressionStream](#getcompressionstream-method-zipstream-class) and [GetDecompressionStream](#getdecompressionstream-method-zipstream-class) will throw standard IOExceptions in case of error.

### ZipStream Errors

|  |  |
| --- | --- |
| 101 | The data is of an invalid or unsupported format. |
| 111 | Can't open file for read. |
| 150 | An I/O error has occurred (details follow). |
