mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: update attributes to use new syntax
This commit is contained in:
parent
dd81cb98c6
commit
757929392e
739 changed files with 2982 additions and 2982 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue