1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

compress: Add gzip module & refactor compress & compress.zlib module (#14599)

This commit is contained in:
ChAoS_UnItY
2022-06-03 14:00:11 +08:00
committed by GitHub
parent 251716fa0e
commit 65066098d8
6 changed files with 89 additions and 45 deletions

View File

@ -0,0 +1,17 @@
## Description:
`compress.gzip` is a module that assists in the compression and
decompression of binary data using `gzip` compression
## Examples:
```v
import compress.gzip
fn main() {
uncompressed := 'Hello world!'
compressed := gzip.compress(uncompressed.bytes())?
decompressed := gzip.decompress(compressed)?
assert decompressed == uncompressed.bytes()
}
```