Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Array.append(type_dictionary[field_type]) ##dodaje element na końcu listy
- na końcu key == 29:
- ###MIKOŁAJ - return Array, albo odwołanie do fieldofArray?
- ###prawdopodobnie trzeba będzie
- def recognizeWhatType(numb_oftypebits,mess, poss):
- value = ""
- j = 0
- shape_dictionary = {'000': 2, '001': 3, '010': 4, '011': 5, '100': 7, '101': 9}
- while j < numb_oftypebits:
- value += str(mess[poss])
- poss += 1
- typeofshape = shape_dictionary[value]
- numberofFields = len(arrays_aggregates.arraysDataBitlengths[typeofshape])
- poss += 3 #czy potrzebne (to do przedunięcia o liczbę bitów typu na początku ciągu)
- return typeofshape, numberofFields
- def fieldofArray(n, f_num, type, mess, pos, endgameArray, dict): # pozamieniać w typach 6_7 i 8_7
- while n < f_num:
- field_bits = arrays_aggregates.arraysDataBitlengths[type][n]
- field_type = arrays_aggregates.arraysDataTypes[type][n]
- fragment = mess[pos:(field_bits + pos)]
- endgameArray[n] = dict[field_type(fragment, field_bits)]
- n += 1
- return endgameArray
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement