2022-01-05 17:06:08 +01:00
|
|
|
## Description:
|
|
|
|
|
2022-01-07 12:28:50 +01:00
|
|
|
`compress.zlib` is a module that assists in the compression and
|
|
|
|
decompression of binary data using `zlib` compression
|
2022-01-05 17:06:08 +01:00
|
|
|
|
|
|
|
## Examples:
|
|
|
|
|
|
|
|
```v
|
|
|
|
import compress.zlib
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
uncompressed := 'Hello world!'
|
|
|
|
compressed := zlib.compress(uncompressed.bytes()) ?
|
|
|
|
decompressed := zlib.decompress(compressed) ?
|
|
|
|
assert decompressed == uncompressed.bytes()
|
|
|
|
}
|
|
|
|
```
|