func ParseNibbleXORTables(in []byte) (nxts NibbleXORTables, rest []byte) { if in == nil || len(in) < nxtsSize { return nxts, nil } for i := 0; i < 32; i++ { for j := 0; j < 15; j++ { loc := 15*i + j nxts[i][j] = table.ParsedNibble(in[nxtSize*loc : nxtSize*(loc+1)]) } } return nxts, in[nxtsSize:] }
func parseXORTables(in []byte) (out [9][32][3]table.Nibble, rest []byte) { if in == nil || len(in) < xorTableSize*9*32*3 { return } for i := 0; i < 9; i++ { for j := 0; j < 32; j++ { for k := 0; k < 3; k++ { loc := 32*3*i + 3*j + k out[i][j][k] = table.ParsedNibble(in[xorTableSize*loc : xorTableSize*(loc+1)]) } } } return out, in[xorTableSize*9*32*3:] }