mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: replace []byte with []u8
This commit is contained in:
parent
0527ac633e
commit
fb192d949b
164 changed files with 533 additions and 533 deletions
|
@ -11,7 +11,7 @@ fn C.tinfl_decompress_mem_to_heap(source_buf voidptr, source_buf_len usize, out_
|
|||
// compresses an array of bytes using zlib and returns the compressed bytes in a new array
|
||||
// Example: compressed := zlib.compress(b) ?
|
||||
[manualfree]
|
||||
pub fn compress(data []byte) ?[]byte {
|
||||
pub fn compress(data []u8) ?[]u8 {
|
||||
if u64(data.len) > zlib.max_size {
|
||||
return error('data too large ($data.len > $zlib.max_size)')
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ pub fn compress(data []byte) ?[]byte {
|
|||
// decompresses an array of bytes using zlib and returns the decompressed bytes in a new array
|
||||
// Example: decompressed := zlib.decompress(b) ?
|
||||
[manualfree]
|
||||
pub fn decompress(data []byte) ?[]byte {
|
||||
pub fn decompress(data []u8) ?[]u8 {
|
||||
mut out_len := usize(0)
|
||||
|
||||
// flags = TINFL_FLAG_PARSE_ZLIB_HEADER (0x1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue