---
updatedAt: 2026-11-09T10:15:22.000Z
agentTools:
  projectIndex: https://docs.developer.rabobank.com/payments/llms.txt
---

# Gzip

Gzip compression method reduces file size by identifying and replacing repeated sequences with shorter references.

## Using GZIP compression

The API supports GZIP compressed files when doing a POST payment call to upload batches. To use GZIP compression, you should either:

* Set up the `Content-Encoding` header to `gzip`, or
* Make sure that the file you want to upload has a `.gz` extension.

<Callout icon="🚧" theme="warn">
  Make sure to gzip the file before upload using the Gzip standard only, the API cannot perform this action.

  For windows, external applications needs to be installed for gzip functionality.
</Callout>

For linux/mac you can use bash gzip command:

```
gzip $1 --best
```

Example for gzip file using the Java content:

```java
public static byte[] gzipContent(String content) throws IOException {
     if (content == null || content.isEmpty()) {
       throw new IllegalArgumentException("Content cannot be null or empty");
     }
     try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
     GZIPOutputStream gzipOutputStream = new GZIPOutputStream(byteArrayOutputStream)) {
        gzipOutputStream.write(content.getBytes());
        gzipOutputStream.finish();
        return byteArrayOutputStream.toByteArray();
     }
}
```

<Callout icon="📘" theme="info">
  Only the XML file (e.g., PAIN.001) should be zipped. Exclude headers, signatures, or any other metadata from the gzip file.
</Callout>

## Creating the Digest

The digest must be created from the gzip content and the metadata should be part of the digest. The digest calculation remains the same, now only the content must be Gzipped.

Use SHA-512 or SHA-256 for hashing, and base64 encode the resulting hash.

### Content Encoding

To indicate to the API that the upload is a GZIP content, either the header `Content-Encoding` must be set to `gzip` or the file extension of the upload file must be set to `.gz`.

Header example Key -> value example:

```
“content-encoding” -> “gzip”
```

<Callout icon="🚧" theme="warn">
  Zipping is mandatory for files containing more than 25,000 transactions. Zipping is also required when the file size exceeds 40MB.
</Callout>

**Maximum Number of Transactions**

The maximum number of transactions allowed in a single file is 100,000. For more details, refer to the Rabobank website \[<https://www.rabobank.nl/en/business/support/online-bankieren/formats>].

<Callout icon="📘" theme="info">
  For example files and example values to test with in the Sandbox go to the [Signing documentation](https://dash.readme.com/group/rabobank-group/reusable-content/BulkPaymentsGzip)
</Callout>

<br />