Stdlib module compression.vitl

This page is a wiki-style reference for one concrete stdlib file. It explains what the file owns, where it fits in the family, and how to decide whether this is the right surface to depend on.

Visual portrait of compression.vitl
Wiki-style portrait for compression.vitl.

Family: compression

Kind: public stdlib surface

Page style: this reference follows the same “encyclopedic card + portrait + usage contract” logic as the keyword pages, but for stdlib modules.

Summary

Overview

FieldValue
Pathcompression.vitl
Familycompression
Kindpublic stdlib surface
Line count594
Declared procedures47
Declared forms/picks7

`compression.vitl` is a public stdlib surface inside the `compression` family. It should be read as one focused slice of the broader family responsibility: Algorithms and interfaces for compacting data: huffman, lz, deflate, brotli, stats, and shared compression interfaces.

Purpose

This file should be chosen because of responsibility, not because its name “sounds close enough”. Inside the compression family, it carries one focused part of the contract and keeps that responsibility separate from neighboring concerns.

  • A report archive can be built in memory, then compressed before emission.
  • A transport layer can separate serialization from compression instead of mixing both in one procedure.

Taxonomy

Think of this page as a generated encyclopedia entry rather than a hand-written tutorial. The goal is to show what kind of module this is, how dense it is, and what reading strategy makes sense before depending on it.

  • Large algorithm surface: this file exposes many procedures and likely acts as a domain toolkit rather than a single thin wrapper.
  • Owns domain vocabulary: the module declares data shapes in addition to executable helpers, so its types are part of the contract.
  • Has tuning constants: part of the module behavior is controlled by named constants that document default precision, limits, or policy.
  • Narrow dependency fan-in: a small set of imports suggests a focused collaboration surface.
  • Explicit export surface: the file ends with visible export declarations instead of relying only on implicit namespace discovery.

Implementation profile

This profile is inferred directly from the source text. It does not replace reading the file, but it tells you quickly whether the module is mostly declarative, loop-heavy, branch-heavy, or organized around many small exits.

SignalCountWhat it suggests
if48Branching density and local decision-making.
while11Loop-heavy or iterative implementation style.
for1Collection-style traversal at source level.
match0Variant-driven branching or grammar-style decoding.
let65Local state and intermediate value density.
give90Number of explicit exit points and result shaping.

Top-level API inventory

SurfaceItems
Procedurescompression_version, compression_algorithms, compression_manifest, compression_ready, compression_health, compression_summary, _char_to_digit, _is_digit, _escape_marker, _unescape_marker, _parse_int, _read_run
FormsCompressionStats, CompressionManifest, CompressionHealth, CompressionSummary, Compressor, Decompressor
PicksCompressionResult
ConstantsZ_FAST_COMPRESSION, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION, Z_DEFAULT_STRATEGY, Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, ALGO_DEFLATE, ALGO_GZIP, ALGO_ZLIB, ALGO_RLE, ALGO_HUFFMAN
Exports*

Imported surfaces

  • src/vitte/stdlib/compression/deflate as deflate use src/vitte/stdlib/compression/brotli as brotli use src/vitte/stdlib/compression/algorithms as algorithms use src/vitte/stdlib/compression/lz as lz use src/vitte/stdlib/compression/huffman as huffman use src/vitte/stdlib/compression/stats as stats

Position in family

This file is module 1 of 9 in the compression family when ordered by path. By procedure count it ranks 1, and by line count it ranks 1. Those ranks are useful as rough signals of breadth, not as quality judgments.

Declaration map

The declaration map turns raw source into a scan-friendly catalog. It is useful when the file is large enough that a reader wants to orient by kinds of surfaces first.

LineNameKindRole
1vitte/stdlib/compressionspaceDeclares the namespace that anchors this file in the stdlib tree.
3src/vitte/stdlib/compression/deflate as deflateuseImports a sibling or supporting surface used by the module.
4src/vitte/stdlib/compression/brotli as brotliuseImports a sibling or supporting surface used by the module.
5src/vitte/stdlib/compression/algorithms as algorithmsuseImports a sibling or supporting surface used by the module.
6src/vitte/stdlib/compression/lz as lzuseImports a sibling or supporting surface used by the module.
7src/vitte/stdlib/compression/huffman as huffmanuseImports a sibling or supporting surface used by the module.
8src/vitte/stdlib/compression/stats as statsuseImports a sibling or supporting surface used by the module.
19Z_FAST_COMPRESSIONconstDefines a named constant reused across the module.
20Z_DEFAULT_COMPRESSIONconstDefines a named constant reused across the module.
21Z_BEST_COMPRESSIONconstDefines a named constant reused across the module.
23Z_DEFAULT_STRATEGYconstDefines a named constant reused across the module.
24Z_FILTEREDconstDefines a named constant reused across the module.
25Z_HUFFMAN_ONLYconstDefines a named constant reused across the module.
26Z_RLEconstDefines a named constant reused across the module.
28ALGO_DEFLATEconstDefines a named constant reused across the module.
29ALGO_GZIPconstDefines a named constant reused across the module.
30ALGO_ZLIBconstDefines a named constant reused across the module.
31ALGO_RLEconstDefines a named constant reused across the module.
32ALGO_HUFFMANconstDefines a named constant reused across the module.
33ALGO_LZ77constDefines a named constant reused across the module.
34ALGO_BROTLIconstDefines a named constant reused across the module.
36ERR_INVALID_ALGOconstDefines a named constant reused across the module.
37ERR_INVALID_DATAconstDefines a named constant reused across the module.
38ERR_EMPTYconstDefines a named constant reused across the module.
40CompressionStatsformIntroduces a structured data shape that other procedures can exchange.
47CompressionManifestformIntroduces a structured data shape that other procedures can exchange.
53CompressionHealthformIntroduces a structured data shape that other procedures can exchange.
65CompressionSummaryformIntroduces a structured data shape that other procedures can exchange.
70CompressorformIntroduces a structured data shape that other procedures can exchange.
77DecompressorformIntroduces a structured data shape that other procedures can exchange.
82CompressionResultpickIntroduces a tagged variant type used to model distinct outcomes.
87compression_versionprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
91compression_algorithmsprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
103compression_manifestprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
111compression_readyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
115compression_healthprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
128compression_summaryprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
135_char_to_digitprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
169_is_digitprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
173_escape_markerprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
190_unescape_markerprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
208_parse_intprocTransforms an input representation into a structured internal value.
222_read_runprocOwns byte movement or host I/O interaction.
253compress_rleprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
290decompress_rleprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
324_wrap_algoprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
329_unwrap_algoprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
349_slice_textprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
361compress_deflateprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
365decompress_deflateprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
369compress_gzipprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
373decompress_gzipprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
377compress_zlibprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
381decompress_zlibprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
385compress_huffmanprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
389decompress_huffmanprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
393compress_lz77procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
397decompress_lz77procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
401compress_brotliprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
405decompress_brotliprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
409compressor_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
418compressor_set_strategyprocOwns a concrete data shape or the operations that maintain it.
423compressor_set_algorithmprocOwns a concrete data shape or the operations that maintain it.
431compressor_compressprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
456compressor_flushprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
460compressor_resetprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
468decompressor_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
475decompressor_set_algorithmprocOwns a concrete data shape or the operations that maintain it.
483decompressor_decompressprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
508decompressor_flushprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
512decompressor_resetprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
518compressprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
526decompressprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
534compress_exprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
543get_compression_ratioprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
552estimate_compressed_sizeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
557get_best_compression_levelprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
567compression_selftestprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.

The table is exhaustive for top-level declarations of the selected kinds. This file declares 78 matching surfaces.

Representative signatures

These signatures are shown in source order so the page keeps the feel of a reference manual, not just a keyword cloud.

  • const Z_FAST_COMPRESSION: i32 = 1 (line 19)
  • const Z_DEFAULT_COMPRESSION: i32 = 6 (line 20)
  • const Z_BEST_COMPRESSION: i32 = 9 (line 21)
  • const Z_DEFAULT_STRATEGY: i32 = 0 (line 23)
  • const Z_FILTERED: i32 = 1 (line 24)
  • const Z_HUFFMAN_ONLY: i32 = 2 (line 25)
  • const Z_RLE: i32 = 3 (line 26)
  • const ALGO_DEFLATE: i32 = 1 (line 28)
  • const ALGO_GZIP: i32 = 2 (line 29)
  • const ALGO_ZLIB: i32 = 3 (line 30)
  • const ALGO_RLE: i32 = 4 (line 31)
  • const ALGO_HUFFMAN: i32 = 5 (line 32)
  • const ALGO_LZ77: i32 = 6 (line 33)
  • const ALGO_BROTLI: i32 = 7 (line 34)
  • const ERR_INVALID_ALGO: i32 = -1 (line 36)
  • const ERR_INVALID_DATA: i32 = -2 (line 37)
  • const ERR_EMPTY: i32 = -3 (line 38)
  • form CompressionStats { (line 40)

The list is intentionally capped here; the source file declares 71 matching signatures in total.

How to use this module

Start by reading the file as an ownership boundary. Ask three questions: what enters this module, what stable types or procedures it exports, and what adjacent module should stay outside of it.

  1. Read space and top-level imports first so the ownership boundary of compression.vitl is explicit.
  2. Scan constants before procedures; they often encode precision, limits, or policy assumptions that explain later behavior.
  3. Read declared forms and picks before algorithms so the data vocabulary is stable in your head.
  4. Traverse procedures in source order; the early helpers usually explain the naming and numeric conventions used later.
  5. Use the source landmarks section below as a table of contents when the file is large.

User example

This example is generated from the actual stdlib module surface. Its job is not to be the smallest snippet possible; its job is to show a realistic consumer-shaped file that exercises the module and mirrors the language keywords the module itself relies on.

space demo/compression
use vitte/stdlib/compression
const SAMPLE_LABEL: string = "demo"
form UserReport {
  label: string,
  ready: bool
}
pick UserOutcome {
  case Ready(message: string)
  case Empty(reason: string)
}
proc run_example() -> UserOutcome {
  let entries = compression_algorithms()
  let ready: bool = compression_ready()
  let stable: bool = ready and true
  let fallback: bool = ready or false
  let idx: int = 0
  let count: int = 0
  while idx < entries.len {
    set count = count + 1
    set idx = idx + 1
  }
  for sample in [1] {
    let seen: int = sample
  }
  if not ready {
    give UserOutcome.Empty("module not ready")
  } else {
    give UserOutcome.Ready("ok")
  }
  let copies: f64 = 1 as f64
}
export run_example

Keyword coverage

This table makes the “all keywords of the module” requirement auditable. It compares the detected Vitte keywords in the source file with the generated consumer example above.

KeywordPresent in module sourceUsed in generated user example
spaceyesyes
useyesyes
constyesyes
formyesyes
pickyesyes
procyesyes
letyesyes
setyesyes
ifyesyes
elseyesyes
whileyesyes
foryesyes
giveyesyes
exportyesyes
trueyesyes
andyesyes
oryesyes
notyesyes
asyesyes

The generated snippet exercises every detected Vitte keyword used by this module.

Source shape

space vitte/stdlib/compression
use src/vitte/stdlib/compression/deflate as deflate
use src/vitte/stdlib/compression/brotli as brotli
use src/vitte/stdlib/compression/algorithms as algorithms
use src/vitte/stdlib/compression/lz as lz
use src/vitte/stdlib/compression/huffman as huffman
use src/vitte/stdlib/compression/stats as stats
export *
const Z_FAST_COMPRESSION: i32 = 1
const Z_DEFAULT_COMPRESSION: i32 = 6

The excerpt is not meant to replace the file. It exists to make the module recognizable at first glance, the same way a Wikipedia infobox helps the reader orient before reading the whole article.

Source landmarks

Large files are easier to retain when they have visible landmarks. When the source contains explicit section banners, they are surfaced here; otherwise the first major declarations are used as anchors.

  • Vitte Compression Library / Maximal self-contained facade for compression and / decompression workflows, with portable string encoders, / stats, manifest metadata, and a self-test

Source organization

When a file carries its own internal chaptering, those chapters usually reveal the intended reading order better than a flat symbol list. This section reconstructs that organization from the source itself.

Opening declarations

Top-level items: 7. Procedures: 0. Data surfaces: 0. Constants: 0.

First visible names: vitte/stdlib/compression, src/vitte/stdlib/compression/deflate as deflate, src/vitte/stdlib/compression/brotli as brotli, src/vitte/stdlib/compression/algorithms as algorithms, src/vitte/stdlib/compression/lz as lz, src/vitte/stdlib/compression/huffman as huffman, src/vitte/stdlib/compression/stats as stats

Vitte Compression Library / Maximal self-contained facade for compression and / decompression workflows, with portable string encoders, / stats, manifest metadata, and a self-test

Top-level items: 72. Procedures: 47. Data surfaces: 7. Constants: 17.

First visible names: *, Z_FAST_COMPRESSION, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION, Z_DEFAULT_STRATEGY, Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, ALGO_DEFLATE, ALGO_GZIP

Complete API catalog

This catalog is the exhaustive file-level index for the module. It is intentionally closer to a generated encyclopedia appendix than to a tutorial summary.

Constants

LineNameSignatureRole
19Z_FAST_COMPRESSIONconst Z_FAST_COMPRESSION: i32 = 1Defines a named constant reused across the module.
20Z_DEFAULT_COMPRESSIONconst Z_DEFAULT_COMPRESSION: i32 = 6Defines a named constant reused across the module.
21Z_BEST_COMPRESSIONconst Z_BEST_COMPRESSION: i32 = 9Defines a named constant reused across the module.
23Z_DEFAULT_STRATEGYconst Z_DEFAULT_STRATEGY: i32 = 0Defines a named constant reused across the module.
24Z_FILTEREDconst Z_FILTERED: i32 = 1Defines a named constant reused across the module.
25Z_HUFFMAN_ONLYconst Z_HUFFMAN_ONLY: i32 = 2Defines a named constant reused across the module.
26Z_RLEconst Z_RLE: i32 = 3Defines a named constant reused across the module.
28ALGO_DEFLATEconst ALGO_DEFLATE: i32 = 1Defines a named constant reused across the module.
29ALGO_GZIPconst ALGO_GZIP: i32 = 2Defines a named constant reused across the module.
30ALGO_ZLIBconst ALGO_ZLIB: i32 = 3Defines a named constant reused across the module.
31ALGO_RLEconst ALGO_RLE: i32 = 4Defines a named constant reused across the module.
32ALGO_HUFFMANconst ALGO_HUFFMAN: i32 = 5Defines a named constant reused across the module.
33ALGO_LZ77const ALGO_LZ77: i32 = 6Defines a named constant reused across the module.
34ALGO_BROTLIconst ALGO_BROTLI: i32 = 7Defines a named constant reused across the module.
36ERR_INVALID_ALGOconst ERR_INVALID_ALGO: i32 = -1Defines a named constant reused across the module.
37ERR_INVALID_DATAconst ERR_INVALID_DATA: i32 = -2Defines a named constant reused across the module.
38ERR_EMPTYconst ERR_EMPTY: i32 = -3Defines a named constant reused across the module.

Data surfaces

LineNameSignatureRole
40CompressionStatsform CompressionStats {Introduces a structured data shape that other procedures can exchange.
47CompressionManifestform CompressionManifest {Introduces a structured data shape that other procedures can exchange.
53CompressionHealthform CompressionHealth {Introduces a structured data shape that other procedures can exchange.
65CompressionSummaryform CompressionSummary {Introduces a structured data shape that other procedures can exchange.
70Compressorform Compressor {Introduces a structured data shape that other procedures can exchange.
77Decompressorform Decompressor {Introduces a structured data shape that other procedures can exchange.
82CompressionResultpick CompressionResult {Introduces a tagged variant type used to model distinct outcomes.

Procedures

LineNameSignatureRole
87compression_versionproc compression_version() -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
91compression_algorithmsproc compression_algorithms() -> [string] {Represents one top-level surface in the file contract and should be read as part of the module boundary.
103compression_manifestproc compression_manifest() -> CompressionManifest {Represents one top-level surface in the file contract and should be read as part of the module boundary.
111compression_readyproc compression_ready() -> bool {Represents one top-level surface in the file contract and should be read as part of the module boundary.
115compression_healthproc compression_health() -> CompressionHealth {Represents one top-level surface in the file contract and should be read as part of the module boundary.
128compression_summaryproc compression_summary() -> CompressionSummary {Represents one top-level surface in the file contract and should be read as part of the module boundary.
135_char_to_digitproc _char_to_digit(ch: char) -> i32 {Represents one top-level surface in the file contract and should be read as part of the module boundary.
169_is_digitproc _is_digit(ch: char) -> bool {Represents one top-level surface in the file contract and should be read as part of the module boundary.
173_escape_markerproc _escape_marker(text: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
190_unescape_markerproc _unescape_marker(text: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
208_parse_intproc _parse_int(text: string, start: i32, end: i32) -> i32 {Transforms an input representation into a structured internal value.
222_read_runproc _read_run(text: string, index: i32) -> [i32] {Owns byte movement or host I/O interaction.
253compress_rleproc compress_rle(data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
290decompress_rleproc decompress_rle(data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
324_wrap_algoproc _wrap_algo(tag: string, data: string, level: i32) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
329_unwrap_algoproc _unwrap_algo(tag: string, data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
349_slice_textproc _slice_text(text: string, start: i32, end: i32) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
361compress_deflateproc compress_deflate(data: string, level: i32) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
365decompress_deflateproc decompress_deflate(data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
369compress_gzipproc compress_gzip(data: string, level: i32) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
373decompress_gzipproc decompress_gzip(data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
377compress_zlibproc compress_zlib(data: string, level: i32) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
381decompress_zlibproc decompress_zlib(data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
385compress_huffmanproc compress_huffman(data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
389decompress_huffmanproc decompress_huffman(data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
393compress_lz77proc compress_lz77(data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
397decompress_lz77proc decompress_lz77(data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
401compress_brotliproc compress_brotli(data: string, level: i32) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
405decompress_brotliproc decompress_brotli(data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
409compressor_newproc compressor_new(level: i32) -> Compressor {Represents one top-level surface in the file contract and should be read as part of the module boundary.
418compressor_set_strategyproc compressor_set_strategy(c: Compressor, strategy: i32) -> int {Owns a concrete data shape or the operations that maintain it.
423compressor_set_algorithmproc compressor_set_algorithm(c: Compressor, algorithm: i32) -> int {Owns a concrete data shape or the operations that maintain it.
431compressor_compressproc compressor_compress(c: Compressor, data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
456compressor_flushproc compressor_flush(c: Compressor) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
460compressor_resetproc compressor_reset(c: Compressor) -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
468decompressor_newproc decompressor_new() -> Decompressor {Represents one top-level surface in the file contract and should be read as part of the module boundary.
475decompressor_set_algorithmproc decompressor_set_algorithm(d: Decompressor, algorithm: i32) -> int {Owns a concrete data shape or the operations that maintain it.
483decompressor_decompressproc decompressor_decompress(d: Decompressor, data: string) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
508decompressor_flushproc decompressor_flush(d: Decompressor) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
512decompressor_resetproc decompressor_reset(d: Decompressor) -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
518compressproc compress(data: string, algo: i32, level: i32) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
526decompressproc decompress(data: string, algo: i32) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
534compress_exproc compress_ex(data: string, algo: i32, level: i32, strategy: i32) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
543get_compression_ratioproc get_compression_ratio(original_size: i64, compressed_size: i64) -> f64 {Represents one top-level surface in the file contract and should be read as part of the module boundary.
552estimate_compressed_sizeproc estimate_compressed_size(data: string) -> i64 {Represents one top-level surface in the file contract and should be read as part of the module boundary.
557get_best_compression_levelproc get_best_compression_level(data: string) -> i32 {Represents one top-level surface in the file contract and should be read as part of the module boundary.
567compression_selftestproc compression_selftest() -> bool {Represents one top-level surface in the file contract and should be read as part of the module boundary.

Imports

LineNameSignatureRole
3src/vitte/stdlib/compression/deflate as deflateuse src/vitte/stdlib/compression/deflate as deflateImports a sibling or supporting surface used by the module.
4src/vitte/stdlib/compression/brotli as brotliuse src/vitte/stdlib/compression/brotli as brotliImports a sibling or supporting surface used by the module.
5src/vitte/stdlib/compression/algorithms as algorithmsuse src/vitte/stdlib/compression/algorithms as algorithmsImports a sibling or supporting surface used by the module.
6src/vitte/stdlib/compression/lz as lzuse src/vitte/stdlib/compression/lz as lzImports a sibling or supporting surface used by the module.
7src/vitte/stdlib/compression/huffman as huffmanuse src/vitte/stdlib/compression/huffman as huffmanImports a sibling or supporting surface used by the module.
8src/vitte/stdlib/compression/stats as statsuse src/vitte/stdlib/compression/stats as statsImports a sibling or supporting surface used by the module.

Exports

LineNameSignatureRole
17*export *Re-exports surfaces that the module wants to expose as part of its public boundary.

Integration boundaries

Within compression, this file should remain focused. If a future helper changes the host boundary, scheduling boundary, or data-shape boundary, it probably belongs in a neighbor module instead of being added here by convenience.

  • Family responsibility: Algorithms and interfaces for compacting data: huffman, lz, deflate, brotli, stats, and shared compression interfaces.
  • Family architecture role: Use `compression` when compactness is a first-class requirement and the program must explain which algorithmic boundary owns that transformation.

Composition guidance

Choose this module when

  • Choose compression.vitl when the main question is owned by this module rather than by transport, storage, orchestration, or user-interface code.
  • A report archive can be built in memory, then compressed before emission.
  • A transport layer can separate serialization from compression instead of mixing both in one procedure.

Pause before extending it when

  • Avoid extending this file when the new helper mostly changes the boundary to host I/O, runtime coordination, or foreign integration instead of staying inside compression.
  • Check nearby modules such as compression/algorithms.vitl, compression/brotli.vitl, compression/deflate.vitl before adding convenience wrappers here.

Relationship table

This table keeps the page closer to a real encyclopedia entry: a module is easier to understand when compared with its nearest alternatives in the same family.

NeighborProceduresData surfacesWhy compare it
compression/algorithms.vitl124Shares the same family boundary but carries a distinct slice of responsibility.
compression/brotli.vitl173Shares the same family boundary but carries a distinct slice of responsibility.
compression/deflate.vitl134Shares the same family boundary but carries a distinct slice of responsibility.
compression/huffman.vitl154Shares the same family boundary but carries a distinct slice of responsibility.
compression/interface.vitl205Shares the same family boundary but carries a distinct slice of responsibility.
compression/lz.vitl153Shares the same family boundary but carries a distinct slice of responsibility.
compression/stats.vitl174Shares the same family boundary but carries a distinct slice of responsibility.
compression/tests/smoke.vitl10Shares the same family boundary but carries a distinct slice of responsibility.

Neighbor modules