This repository has been archived by the owner. It is now read-only.
The GZIP accelerator provides an hardware-accelerated gzip compression.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


GZIP Accelerator

The GZIP accelerator provides an hardware-accelerated gzip compression. It is up to 25X faster than CPU compression.


This figure is provided as an example, please note that compression speed is somewhat dependent on the file content.


  • Hardware-accelerated GZIP compression
  • Remote or local execution facility
  • Easy to use Python API


  • The GZIP accelerator does not support password-protected archive generation.
  • Inputs and outputs can't be larger than 30GB.
  • See also limitations from API


This section describes accelerator inputs and outputs.

Configuration parameters

No parameters required.

Processing parameters

Generic parameters:

  • file_in: Path to the file to compress.
  • file_out: Path to the result compressed file.

Processing output

Processing output is file defined by file_out parameter.

Getting started

The Apyfal Python library is required.

Apyfal is installed using PIP. Some installation options are available depending the host you want to use (See "Installation" in Apyfal documentation for more information).

You can install the full package with all options using:

pip install apyfal[all]

Using Accelerator with Apyfal

Running example

This example compress a file of 1 MB.

You can clone a repository to get examples files, then move to the cloned directory:

git clone --depth 1
cd gzip

You need to create and configure an accelerator.conf file to run the example. See "Configuration" in Apyfal documentation for more information.

You can run the example with Apyfal :


The result is the "results/sample_1_1MB.gz" file.

Using Apyfal step by step

This section explains how to run this particular accelerator. For explanation on Apyfal and host configuration, See "Getting Started" in Apyfal documentation.

import apyfal

# 1- Create Accelerator
with apyfal.Accelerator(accelerator='cast_gzip') as myaccel:
    # 2- Configure Accelerator and its host
    #    Note: This step can take some minutes depending the configured host
    # 3- Process file
    myaccel.process(file_in="samples/sample_1_1MB.txt", file_out="results/sample_1_1MB.gz")

The result is the "results/sample_1_1MB.gz" file.

Local execution on cloud instance

This section shows how to run the above example directly on host.

This example requires an host running the accelerator.

Creating cloud instance host using Apyfal CLI

You can easily generate a cloud instance host with Apyfal CLI

apyfal create --accelerator cast_gzip

apyfal start

And then connect to it with SSH (key_pair and ip_address values are printed by Apyfal CLI on start):

ssh -Yt -i ~/.ssh/${key_pair}.pem centos@${ip_address}

It is now possible to continue using Apyfal as Python library or as CLI, The example next steps will use the CLI.

Accelerator configuration

First, initialize the Apyfal CLI.

apyfal create

Like previously, start the accelerator:

apyfal start

Process with accelerator

Then, process with accelerator.

apyfal process --file_in samples/sample_1_1MB.txt --file_out results/sample_1_1MB.gz

The result is the "results/sample_1_1MB.gz" file.

Terminate cloud instance with Apyfal CLI

From client computer, don't forget to terminate instance you have created with Apyfal once you have finished with it:

apyfal stop

Support and enhancement requests


Contact us if you have any support or enhancement request