---
title: "ZSTD_COMPRESS"
description: "Die SQL-Funktion ZSTD_COMPRESS komprimiert einen BLOB mit dem Zstandard-Algorithmus."
language: de
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/de/docs/invantive-universalsql/grammar/sql-functions/zstd-compress
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/zstd-compress
updated: 2026-12-04T14:58:54Z
license: https://documentation.invantive.eu/de/
---

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

## Anwendung
Die SQL-Funktion `ZSTD_COMPRESS` komprimiert ein `blob` mithilfe des Zstandard-Algorithmus.

Siehe auch [[ZSTD_DECOMPRESS]] und [[ZLIB_COMPRESS]].

Parameter:
- Eingabe (`blob`): Das `blob`, das komprimiert werden soll.

Gibt eine mit Zstandard komprimierte Version der Eingabe zurück.

## Beispiele
Im folgenden Beispiel werden die neun ASCII-Zeichen `ACME` komprimiert und wiederhergestellt, und der ursprüngliche Text wird abgerufen:
```sql
select blob_to_text(zstd_decompress(zstd_compress(ascii_to_blob('ACME'))))

-------------------
ACME
```
Im folgenden Beispiel wird ein Text komprimiert und das komprimierte `blob`, das als Base64 kodiert ist, abgerufen:
```sql
select base64_encode(zstd_compress('VGhpcyBpcyBhIHZlcnkgbG9uZyB0ZXh0IHRvIHRlc3QgdGhlIFpzdGQgY29tcHJlc3Npb24gbWV0aG9k'))

-------------------
KLUv/SA8vQEAwsMMFLAnHd2OTKNtYpi2ISYmwTDAZCECxao8IzN3TMax4dILZvUeu/Ui7ASy4iTxWPjMZwoIAA==
```

