---
title: "ZLIB_COMPRESS"
description: "Funkce ZLIB_COMPRESS SQL komprimuje BLOB pomoc\u00ED algoritmu Zlib."
language: cs
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/cs/docs/invantive-universalsql/grammar/sql-functions/zlib-compress
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/zlib-compress
updated: 2026-12-04T14:57:48Z
license: https://documentation.invantive.eu/cs/
---

## Syntaxe
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> ZLIB_COMPRESS[ZLIB_COMPRESS]:::quoted
    ZLIB_COMPRESS --> End((END))
```

## Účel
Funkce `ZLIB_COMPRESS` SQL komprimuje `blob` pomocí algoritmu Zlib.

Viz také [[ZLIB_DECOMPRESS]] a [[GZIP]].

Parametry:
- vstup (`blob`): `blob`, který se má komprimovat.

Vrací: verzi vstupu komprimovanou algoritmem Zlib.

## Příklady
Následující příklad komprimuje a dekomprimuje devět ASCII znaků `ACME` a načte původní text:
```sql
select blob_to_text(zlib_decompress(zlib_compress(ascii_to_blob('ACME'))))

-------------------
ACME
```
Následující příklad komprimuje text a načte komprimovaný `blob` zakódovaný jako base64:
```sql
select base64_encode(zlib_compress('VGhpcyBpcyBhIHZlcnkgbG9uZyB0ZXh0IHRvIHRlc3QgdGhlIFpMaWIgY29tcHJlc3Npb24gbWV0aG9k'))

-------------------
eJwFwbkNgEAQA8BWXBAhERmPxa7E3aKzhaB7ZuZIIYUVD8eHq/oJ8zVcMGU4iGXKDXu1e1DK6mh01PEDjdMV+Q==
```

