Module compress.deflate stdlib

compress.deflate
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
1
Imported by:
0
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

Imported by

This section is empty.

Overview

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

Examples:

import compress.deflate

fn main() {
    uncompressed := 'Hello world!'
    compressed := deflate.compress(uncompressed.bytes())!
    decompressed := deflate.decompress(compressed)!
    assert decompressed == uncompressed.bytes()
}

Aliases

This section is empty.

Constants

This section is empty.

Sum types

This section is empty.

Functions

#fn compress

fn compress(data []u8) ![]u8

compresses an array of bytes using deflate and returns the compressed bytes in a new array

Example:

compressed := deflate.compress(b)?

#fn decompress

fn decompress(data []u8) ![]u8

decompresses an array of bytes using deflate and returns the decompressed bytes in a new array

Example:

decompressed := deflate.decompress(b)?

Structs

This section is empty.

Interfaces

This section is empty.

Enums

This section is empty.