Skip to content

compress — Overview

High-performance compression and decompression utilities, implemented entirely in pure Vex with zero C dependencies.

Supported Algorithms

AlgorithmCompressionDecompressionStandardBest For
LZ4Block FormatUltra-fast real-time streaming
ZstdRFC 8878Best ratio-to-speed balance
Gzip/DeflateRFC 1952/1951HTTP, archives, universal compat
BrotliRFC 7932Web content, WOFF2, HTTP
ZlibRFC 1950PNG, legacy protocols

Lines of Code: Vex vs C

AlgorithmC LinesVex LinesReduction
LZ4~2,00035082%
Zstd~20,0001,06095%
Gzip~8,00067792%
Brotli~15,00066096%
Total~45,0002,74794%

Design Philosophy

  • Memory safetyRawBuf byte access with bounds awareness
  • Portability — No platform-specific code
  • Optimizability — Compiler can inline and vectorize hot paths
  • Auditability — Single-language, no hidden C complexity

Released under the MIT License.