v2 / vlib / compress / zstd / README.md
25 lines · 18 sloc · 624 bytes · 7a9053973d9f4688c5165bf5fe6acfbb7c44b5a8
Raw

Description

compress.zstd is a module that assists in the compression and decompression of binary data using zstd compression.

Examples

Decode a .zst file from disk:

import os
import compress.zstd

fn main() {
    compressed := os.read_bytes('document.zst') or { panic(err) }
    decompressed := zstd.decompress(compressed) or { panic(err) }
    println(decompressed.bytestr())
}

For a runnable example in this repository, see examples/read_zstd_file.v.

read_zstd_files_test.v is a test file. Run it with v test read_zstd_files_test.v, not with v read_zstd_files_test.v.