func loadRBMH(ls *persist.LoadSaver) Pattern { rbmh := &RBMHSequence{} rbmh.Seq = Sequence(ls.LoadBytes()) for i := range rbmh.Shift { rbmh.Shift[i] = ls.LoadSmallInt() } return rbmh }
func loadBMH(ls *persist.LoadSaver) Pattern { bmh := &BMHSequence{} bmh.Seq = Sequence(ls.LoadBytes()) for i := range bmh.Shift { bmh.Shift[i] = ls.LoadSmallInt() } return bmh }
func loadSeqSet(ls *persist.LoadSaver) *seqSet { ret := &seqSet{} le := ls.LoadSmallInt() if le == 0 { _ = ls.LoadInts() // discard the empty testtreeindex list too return ret } ret.set = make([]wac.Seq, le) for i := range ret.set { ret.set[i].MaxOffsets = ls.LoadBigInts() ret.set[i].Choices = make([]wac.Choice, ls.LoadSmallInt()) for j := range ret.set[i].Choices { ret.set[i].Choices[j] = make(wac.Choice, ls.LoadSmallInt()) for k := range ret.set[i].Choices[j] { ret.set[i].Choices[j][k] = ls.LoadBytes() } } } ret.testTreeIndex = ls.LoadInts() return ret }
func loadRange(ls *persist.LoadSaver) patterns.Pattern { return Range{ ls.LoadBytes(), ls.LoadBytes(), } }
func loadSequence(ls *persist.LoadSaver) Pattern { return Sequence(ls.LoadBytes()) }