---
title: "ZLIB_COMPRESS"
description: "ZLIB_COMPRESS SQL \uD568\uC218\uB294 Zlib \uC54C\uACE0\uB9AC\uC998\uC744 \uC0AC\uC6A9\uD558\uC5EC BLOB\uC744 \uC555\uCD95\uD569\uB2C8\uB2E4."
language: ko
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/ko/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:58:07Z
license: https://documentation.invantive.eu/ko/
---

## 구문
```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))
```

## 목적
`ZLIB_COMPRESS` SQL 함수는 Zlib 알고리즘을 사용하여 `blob`을(를) 압축합니다.

[[ZLIB_DECOMPRESS]] 및 [[GZIP]]도 참조하십시오.

매개변수:
- input (`blob`): 압축할 `blob`.

반환값: 입력값을 Zlib으로 압축한 버전.

## 예시
다음 예제는 ASCII 문자 `ACME` 아홉 개를 압축한 뒤 다시 풀어 원래 텍스트를 가져옵니다:
```sql
select blob_to_text(zlib_decompress(zlib_compress(ascii_to_blob('ACME'))))

-------------------
ACME
```
다음 예제는 텍스트를 압축하고, base64로 인코딩된 압축 `blob`을(를) 가져옵니다:
```sql
select base64_encode(zlib_compress('VGhpcyBpcyBhIHZlcnkgbG9uZyB0ZXh0IHRvIHRlc3QgdGhlIFpMaWIgY29tcHJlc3Npb24gbWV0aG9k'))

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

