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!'
|
2022-05-13 05:56:21 +02:00
|
|
|
compressed := zlib.compress(uncompressed.bytes())?
|
|
|
|
decompressed := zlib.decompress(compressed)?
|
2022-01-05 17:06:08 +01:00
|
|
|
assert decompressed == uncompressed.bytes()
|
|
|
|
}
|
|
|
|
```
|