itf8

package
v1.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package itf8 provides ITF-8 integer encoding.

ITF-8 integer encoding is specified in the CRAM format specification section 2.3.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(b []byte) (v int32, n int, ok bool)

Decode decodes the ITF-8 encoding in b and returns the int32 value, its width in bytes and whether the decoding was successful. If the encoding is invalid, the expected length of b and false are returned. If b has zero length, zero, zero and false are returned.

func Encode

func Encode(b []byte, v int32) int

Encode encodes v as an ITF-8 into b, which must be large enough, and and returns the number of bytes written.

func Len

func Len(v int32) int

Len returns the number of bytes required to encode u.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL