engine

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalizeBits

func AnalizeBits(bits []types.Bit, opts ...Opt) *types.Stats

AnalizeBits count the occurences of bit string of different length

Using a sliding window, bits string up to length = L (4) are counted in O(N), O(L*N) in general

func BitsToByte

func BitsToByte(bits [8]types.Bit) byte

BitsToByte convers 8 bits to a byte, treating bits as follow

00010101 = 2^4 + 2^2 + 2+0 =

= bits[3] * 2^4 +
  bits[5] * 2^2 +
  bits[7] * 2^0   = byte(21)

func ByteToBit

func ByteToBit(b byte) (types.Bit, error)

func ByteToBits

func ByteToBits(b byte) [8]types.Bit

Types

type Opt added in v1.1.0

type Opt func(*analysisOpt)

func WithMaxBlockSize added in v1.1.0

func WithMaxBlockSize(maxBlockSize int) Opt

func WithTopK added in v1.1.0

func WithTopK(topK int) Opt

Jump to

Keyboard shortcuts

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