Files
herolib/aiprompts/v_core/encoding/leb128.md
2025-09-02 07:28:13 +02:00

1.7 KiB

module leb128

Contents

decode_i32

fn decode_i32(value []u8) (i32, int)

decode_i32 decodes an i32 and returns the number of bytes used from the given leb128 encoded array value

[Return to contents]

decode_i64

fn decode_i64(value []u8) (i64, int)

decode_i64 decodes an i64 and returns the number of bytes used from the given leb128 encoded array value

[Return to contents]

decode_u32

fn decode_u32(value []u8) (u32, int)

decode_u32 decodes an u32 and returns the number of bytes used from the given leb128 encoded array value

[Return to contents]

decode_u64

fn decode_u64(value []u8) (u64, int)

decode_u64 decodes an u64 and returns the number of bytes used from the given leb128 encoded array value

[Return to contents]

encode_i32

fn encode_i32(value i32) []u8

encode_i32 encodes the value as leb128 encoded byte array

[Return to contents]

encode_i64

fn encode_i64(value i64) []u8

encode_i64 encodes the value as leb128 encoded byte array

[Return to contents]

encode_u32

fn encode_u32(value u32) []u8

encode_u32 encodes the value as leb128 encoded byte array

[Return to contents]

encode_u64

fn encode_u64(value u64) []u8

encode_u64 encodes the value as leb128 encoded byte array

[Return to contents]

Powered by vdoc. Generated on: 2 Sep 2025 07:18:04