all: update attributes to use new syntax

This commit is contained in:
Joe C 2023-11-15 16:16:01 +11:00 committed by GitHub
parent dd81cb98c6
commit 757929392e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
739 changed files with 2982 additions and 2982 deletions

View file

@ -10,7 +10,7 @@ fn C.tinfl_decompress_mem_to_heap(source_buf voidptr, source_buf_len usize, out_
// compresses an array of bytes based on providing flags and returns the compressed bytes in a new array
// NB: this is a low level api, a high level implementation like zlib/gzip should be preferred
[manualfree]
@[manualfree]
pub fn compress(data []u8, flags int) ![]u8 {
if u64(data.len) > compress.max_size {
return error('data too large (${data.len} > ${compress.max_size})')
@ -29,7 +29,7 @@ pub fn compress(data []u8, flags int) ![]u8 {
// decompresses an array of bytes based on providing flags and returns the decompressed bytes in a new array
// NB: this is a low level api, a high level implementation like zlib/gzip should be preferred
[manualfree]
@[manualfree]
pub fn decompress(data []u8, flags int) ![]u8 {
mut out_len := usize(0)

View file

@ -40,7 +40,7 @@ pub fn compress(data []u8) ![]u8 {
return result
}
[params]
@[params]
pub struct DecompressParams {
verify_header_checksum bool = true
verify_length bool = true
@ -58,7 +58,7 @@ pub const (
const min_header_length = 18
[noinit]
@[noinit]
pub struct GzipHeader {
pub mut:
length int = 10