openfl.pipelines.skc_pipeline.GZIPTransformer#

class openfl.pipelines.skc_pipeline.GZIPTransformer[source]#

Bases: Transformer

GZIP transformer class for losslessly compressing data.

lossy#

A flag indicating if the transformation is lossy.

Type:

bool

__init__()[source]#

Initialize.

Methods

__init__()

Initialize.

backward(data, metadata, **kwargs)

Decompress data into numpy of float32.

forward(data, **kwargs)

Compress data into bytes.

backward(data, metadata, **kwargs)[source]#

Decompress data into numpy of float32.

Parameters:
  • data – an numpy array with non-zero values.

  • metadata – dictionary to contain information for recovering back to original data array.

Returns:

A numpy array with the original numerical type after

decompression.

Return type:

data

forward(data, **kwargs)[source]#

Compress data into bytes.

Parameters:

data – an numpy array with non-zero values.

Returns:

The compressed data. metadata: An empty dictionary.

Return type:

compressed_bytes_