package
module
Version:
v0.0.0-...-f318066
Opens a new window with list of versions in this module.
Published: Nov 27, 2022
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
¶
zigzag算法的Go实现
安装
go get -u github.com/compression-algorithm-research-lab/go-zigzag
Documentation
¶
func Decode[T gtypes.Integer](bytes []byte) T
func DecodeSlice[T gtypes.Integer](bytes []byte) []T
func Encode[T gtypes.Integer](value T) []byte
Encode 对整数进行zigzag编码为字节数组
func EncodeSlice[T gtypes.Integer](value []T) []byte
EncodeSlice 从zigzag编码的字节数组恢复整数
func FromToZigZag[T gtypes.Integer](value T) T
FromToZigZag 从zigzag格式恢复整数
func ToZigZag[T gtypes.Integer](value T) T
ToZigZag 把整数转为zigzag格式
Source Files
¶
Click to show internal directories.
Click to hide internal directories.