all: replace []byte with []u8

This commit is contained in:
Alexander Medvednikov 2022-04-15 15:35:35 +03:00
parent 0527ac633e
commit fb192d949b
164 changed files with 533 additions and 533 deletions

View file

@ -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)