algorithm

package
v1.1.25 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 0 Imported by: 0

README

algorithm 算法模块

crc16_test.go crc16算法

TestCrc16

t.Log(Crc16([]byte("abcdefg汉字")))
TestCrc16s

t.Log(Crc16s("abcdefg汉字") == Crc16([]byte("abcdefg汉字")))

descartes_test.go 笛卡尔组合

TestDescartes

result := DescartesCombine([][]string{{"A", "B"}, {"1", "2", "3"}, {"a", "b", "c", "d"}})
for _, item := range result {
	t.Log(item)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Crc16

func Crc16(bs []byte) (crc uint16)

func Crc16s added in v1.1.21

func Crc16s(str string) (crc uint16)

func DescartesCombine

func DescartesCombine(dimValue [][]string) [][]string

func Kermit

func Kermit(byteArray []byte) uint16

* * CRC-CCITT (Kermit) * test data source http://www.lammertbies.nl/comm/info/crc-calculation.html

Types

This section is empty.

Jump to

Keyboard shortcuts

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