---
title: "ZLIB_DECOMPRESS"
description: "ZLIB_DECOMPRESS-SQL-funktio purkaa BLOB-tiedon pakkauksen Zlib-algoritmilla."
language: fi
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/fi/docs/invantive-universalsql/grammar/sql-functions/zlib-decompress
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/zlib-decompress
updated: 2026-12-04T14:58:28Z
license: https://documentation.invantive.eu/fi/
---

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

## Tarkoitus
SQL-funktio `ZLIB_DECOMPRESS` purkaa `blob` pakkauksen Zlib-algoritmilla.

Katso myös [[ZLIB_COMPRESS]] ja [[UNGZIP]].

Parametrit:
- input (`blob`): purettava `blob`.

Palauttaa: puretun `blob`.

## Esimerkkejä
Seuraava esimerkki purkaa Zlib-pakatun `blob`-tiedon ja hakee alkuperäisen tekstin:
```sql
select blob_to_text(zlib_decompress(zlib_compress(ascii_to_blob('ACME'))))

-------------------
ACME
```
Seuraava esimerkki purkaa Zlib-pakatun `blob`-tiedon ja muuntaa tuloksen tekstiksi:
```sql
select to_char(zlib_decompress('eJwLycgsVgCiRIWy1KJKhZz8vHSFktSKEoWSfCBdDKQzUhWifDKTFJLzcwuKUouLM/PzFHJTSzLyUwCN0xX5'))

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

