---
title: "UNGZIP"
description: "La fonction SQL UNGZIP d\u00E9compresse un BLOB \u00E0 l\u0027aide de l\u0027algorithme GZIP."
language: fr
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/fr/docs/invantive-universalsql/grammar/sql-functions/ungzip
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/ungzip
updated: 2026-12-04T14:41:34Z
license: https://documentation.invantive.eu/fr/
---

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

## Objet
La fonction SQL `UNGZIP` décompresse un `blob` à l'aide de l'algorithme GZIP.

Voir également [[GZIP]].

Paramètres :
- entrée (`blob`) : L'`blob` à décompresser. Le décodage BASE64 est appliqué automatiquement lorsqu'un texte de type `varchar2` est fourni.

Renvoie : la valeur décompressée sous la forme `blob`.

## Exemples
L'exemple suivant récupère la représentation compressée et décompressée des neuf caractères ASCII `invantive` :
```sql
select base64_encode(ungzip(gzip('aW52YW50aXZl')))

-------------------
aW52YW50aXZl
```
L'exemple suivant récupère le caractère d'un octet `x` à partir de sa représentation compressée au format GZIP :
```sql
select to_char(ungzip('H4sIAHSxJmoA/6sAAIMW3IwBAAAA'))

-------------------
x
```
L'exemple suivant récupère la longueur des caractères compressés et décompressés 1200 représentant 100 fois l'encodage BASE64 des neuf caractères ASCII `invantive` :
```sql
select length(ungzip(gzip(rpad('aW52YW50aXZl', 1200, 'aW52YW50aXZl'))))

-------------------
900
```

