Skip to content

std/encoding/binary

Index

struct LittleEndian
    static fn PutU16(mut b: []byte, x: u16)
    static fn AppendU16(mut b: []byte, x: u16): []byte
    static fn DecodeU16(b: []byte): u16
    static fn PutU32(mut b: []byte, x: u32)
    static fn AppendU32(mut b: []byte, x: u32): []byte
    static fn DecodeU32(b: []byte): u32
    static fn PutU64(mut b: []byte, x: u64)
    static fn AppendU64(mut b: []byte, x: u64): []byte
    static fn DecodeU64(b: []byte): u64
struct BigEndian
    static fn PutU16(mut b: []byte, x: u16)
    static fn AppendU16(mut b: []byte, x: u16): []byte
    static fn DecodeU16(b: []byte): u16
    static fn PutU32(mut b: []byte, x: u32)
    static fn AppendU32(mut b: []byte, x: u32): []byte
    static fn DecodeU32(b: []byte): u32
    static fn PutU64(mut b: []byte, x: u64)
    static fn AppendU64(mut b: []byte, x: u64): []byte
    static fn DecodeU64(b: []byte): u64

LittleEndian

jule
struct LittleEndian{}

Binary encoding implementation for little-endian order.

PutU16

jule
static fn PutU16(mut b: []byte, x: u16)

Encodes unsigned 16-bit integer into 2-bytes slice.

AppendU16

jule
static fn AppendU16(mut b: []byte, x: u16): []byte

Encodes unsigned 16-bit integer and appends to slice.

DecodeU16

jule
static fn DecodeU16(b: []byte): u16

Decodes unsigned 16-bit integer from 2-bytes.

PutU32

jule
static fn PutU32(mut b: []byte, x: u32)

Encodes unsigned 32-bit integer into 4-bytes slice.

AppendU32

jule
static fn AppendU32(mut b: []byte, x: u32): []byte

Encodes unsigned 32-bit integer and appends to slice.

DecodeU32

jule
static fn DecodeU32(b: []byte): u32

Decodes unsigned 32-bit integer from 4-bytes.

PutU64

jule
static fn PutU64(mut b: []byte, x: u64)

Encodes unsigned 64-bit integer into 8-bytes slice.

AppendU64

jule
static fn AppendU64(mut b: []byte, x: u64): []byte

Encodes unsigned 64-bit integer and appends to slice.

DecodeU64

jule
static fn DecodeU64(b: []byte): u64

Decodes unsigned 64-bit integer from 8-bytes.

BigEndian

jule
struct BigEndian{}

Binary encoding implementation for big-endian order.

PutU16

jule
static fn PutU16(mut b: []byte, x: u16)

Encodes unsigned 16-bit integer into 2-bytes slice.

AppendU16

jule
static fn AppendU16(mut b: []byte, x: u16): []byte

Encodes unsigned 16-bit integer and appends to slice.

DecodeU16

jule
static fn DecodeU16(b: []byte): u16

Decodes unsigned 16-bit integer from 2-bytes.

PutU32

jule
static fn PutU32(mut b: []byte, x: u32)

Encodes unsigned 32-bit integer into 4-bytes slice.

AppendU32

jule
static fn AppendU32(mut b: []byte, x: u32): []byte

Encodes unsigned 32-bit integer and appends to slice.

DecodeU32

jule
static fn DecodeU32(b: []byte): u32

Decodes unsigned 32-bit integer from 4-bytes.

PutU64

jule
static fn PutU64(mut b: []byte, x: u64)

Encodes unsigned 64-bit integer into 8-bytes slice.

AppendU64

jule
static fn AppendU64(mut b: []byte, x: u64): []byte

Encodes unsigned 64-bit integer and appends to slice.

DecodeU64

jule
static fn DecodeU64(b: []byte): u64

Decodes unsigned 64-bit integer from 8-bytes.