---
name: "lzss_write"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/lzss_write/3alleg4"
---

# lzss\_write(3alleg4)

Compresses data using LZSS. Allegro game programming library.

## NAME

lzss\_write - Compresses data using LZSS. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int lzss\_write(PACKFILE \*file, LZSS\_PACK\_DATA \*dat, int size,** **unsigned char \*buf, int last);**

## DESCRIPTION

Packs \`size' bytes from \`buf', using the pack information contained in \`dat'. The compressed bytes will be stored in \`file'.

## RETURN VALUE

Returns 0 on success, or EOF if there was an error.

## SEE ALSO

**create\_lzss\_pack\_data**(3alleg4), **free\_lzss\_pack\_data**(3alleg4)
