zigzag

package module
v0.0.0-...-f318066 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 2 Imported by: 1

README

zigzag算法的Go实现

安装

go get -u github.com/compression-algorithm-research-lab/go-zigzag

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode[T gtypes.Integer](bytes []byte) T

func DecodeSlice

func DecodeSlice[T gtypes.Integer](bytes []byte) []T

func Encode

func Encode[T gtypes.Integer](value T) []byte

Encode 对整数进行zigzag编码为字节数组

func EncodeSlice

func EncodeSlice[T gtypes.Integer](value []T) []byte

EncodeSlice 从zigzag编码的字节数组恢复整数

func FromToZigZag

func FromToZigZag[T gtypes.Integer](value T) T

FromToZigZag 从zigzag格式恢复整数

func ToZigZag

func ToZigZag[T gtypes.Integer](value T) T

ToZigZag 把整数转为zigzag格式

Types

This section is empty.

Jump to

Keyboard shortcuts

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