---
title: "ZSTD_DECOMPRESS"
description: "The ZSTD_DECOMPRESS SQL function decompresses a blob using the Zstandard-algorithm."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/zstd-decompress
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/zstd-decompress
updated: 2026-08-28T00:00:00Z
license: https://documentation.invantive.eu/en/
---

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

## Purpose
The `ZSTD_DECOMPRESS` SQL function decompresses a `blob` using the Zstandard-algorithm.

See also [[ZSTD_COMPRESS]] and [[ZLIB_DECOMPRESS]].

Parameters:
- input (`blob`): the `blob` to decompress.

Returns: the decompressed `blob`.

## Examples
The following example decompresses a Zstandard-compressed `blob` and retrieves the original text:
```sql
select blob_to_text(zstd_decompress(zstd_compress(ascii_to_blob('ACME'))))

-------------------
ACME
```
The following example decompresses a Zstandard-compressed `blob` and converts the result to text:
```sql
select to_char(zstd_decompress('KLUv/SA8vQEAwsMMFLAnHd2OTKNtYpi2ISYmwTDAZCECxao8IzN3TMax4dILZvUeu/Ui7ASy4iTxWPjMZwoIAA=='))

-------------------
This is a very long text to test the Zstd compression method
```