Documentation ¶
Index ¶
- func Compress(fileContents []byte) []byte
- func Decompress(fileContents []byte) []byte
- func FindValueUpStack(lookFor byte, stack []MarkovChain) int
- func GetBitsFromChain(node *MarkovChain, input []byte, stack *[]MarkovChain) []int
- func GetIndexOfNodeWithMoveUp(moveUp int, nodes []MarkovChain) int
- func GetIndexOfNodeWithValue(lookFor byte, nodes []MarkovChain) int
- func GetOutputFromBits(bits []int, node *MarkovChain, previousStack *[]MarkovChain) []byte
- func NewReader(r io.Reader) io.Reader
- func NewWriter(w io.Writer) io.WriteCloser
- func PrintMarkovChain(chain *MarkovChain, indentation int)
- func SortNodesByOccurrences(chain *MarkovChain)
- func UpwardTravels(chain *MarkovChain) int
- type MarkovChain
- type Reader
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decompress ¶
func FindValueUpStack ¶
func FindValueUpStack(lookFor byte, stack []MarkovChain) int
FindValueUpStack returns how far up the stack it should go to find the byte, len(stack) for not found
func GetBitsFromChain ¶
func GetBitsFromChain(node *MarkovChain, input []byte, stack *[]MarkovChain) []int
func GetIndexOfNodeWithMoveUp ¶
func GetIndexOfNodeWithMoveUp(moveUp int, nodes []MarkovChain) int
func GetIndexOfNodeWithValue ¶
func GetIndexOfNodeWithValue(lookFor byte, nodes []MarkovChain) int
func GetOutputFromBits ¶
func GetOutputFromBits(bits []int, node *MarkovChain, previousStack *[]MarkovChain) []byte
func PrintMarkovChain ¶
func PrintMarkovChain(chain *MarkovChain, indentation int)
func SortNodesByOccurrences ¶
func SortNodesByOccurrences(chain *MarkovChain)
func UpwardTravels ¶
func UpwardTravels(chain *MarkovChain) int
Types ¶
type MarkovChain ¶
type MarkovChain struct { Value byte Nodes *[]MarkovChain Occurrences int MoveUp int }
Click to show internal directories.
Click to hide internal directories.