codec

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinaryDecoding added in v0.1.0

func BinaryDecoding(buf *bytes.Buffer, v any) (err error)

BinaryDecoding 二进制解码

func BinaryEncoding added in v0.1.0

func BinaryEncoding(buf *bytes.Buffer, v any) (err error)

BinaryEncoding 二进制编码

func BinaryWrite

func BinaryWrite(buf *bytes.Buffer, v any) (err error)

BinaryWrite 将所有的类型 转成byte buffer类型,易于存储// TODO change func BinaryWrite(v any) (buf *bytes.Buffer, err error) {

func DecodePostings

func DecodePostings(buf []byte) (p *types.InvertedIndexValue, err error)

DecodePostings 解码 return *PostingsList postingslen err

func EncodePostings

func EncodePostings(postings *types.InvertedIndexValue) (buf []byte, err error)

EncodePostings 编码

func GobWrite

func GobWrite(v any) (buf *bytes.Buffer, err error)

GobWrite 将所有的类型 转成 bytes.Buffer 类型,易于存储// TODO change

func VBDecode added in v0.1.0

func VBDecode(bytestream []byte) []uint64

VBDecode 将VB编码的字节序列解码为整数数组

func VBEncodeNumber added in v0.1.0

func VBEncodeNumber(n uint32) string

VBEncodeNumber 将整数编码为VB编码的字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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