ltf8

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 ltf8 provides LTF-8 integer encoding.

LTF-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 int64, n int, ok bool)

Decode decodes the LTF-8 encoding in b and returns the int64 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 int64) int

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

func Len

func Len(v int64) int

Len returns the number of bytes required to encode v.

Types

This section is empty.

Jump to

Keyboard shortcuts

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