Lines Matching refs:struct
31 import struct
127 return b''.join(struct.pack('B', x) for x in pattern)
316 return struct.pack('<6I', *data)
329 result = [struct.pack('<3I', 0, min_ch, max_ch + 1)]
331 result.append(struct.pack('<B', b))
335 result = [struct.pack('<2I', 1, len(ch_map))]
338 result.append(struct.pack('<I', data))
354 result = [struct.pack('<6I', 0, char_mask, link_shift, link_mask, pattern_shift, n_trie)]
373 result.append(struct.pack('<I', packed))
402 result = [struct.pack('<4I', *data)]
404 result.append(struct.pack('<I', x))
460 pattern_offset = struct.unpack('<I', pattern_data[8:12])[0]
461 entry = struct.unpack('<I', pattern_data[16 + ix * 4: 16 + ix * 4 + 4])[0]
469 (char_mask, link_shift, link_mask, pattern_shift) = struct.unpack('<4I', trie_data[4:20])
470 node_entry = struct.unpack('<I', trie_data[24 + ix * 4: 24 + ix * 4 + 4])[0]
481 code = struct.unpack('B', pat[pat_off : pat_off + 1])[0]
502 edge_entry = struct.unpack('<I', trie_data[24 + (ix + ch) * 4: 24 + (ix + ch) * 4 + 4])[0]
518 (magic, version, alphabet_off, trie_off, pattern_off, file_size) = struct.unpack('<6I', header)
524 alphabet_version = struct.unpack('<I', alphabet_data[:4])[0]
527 (min_ch, max_ch) = struct.unpack('<2I', alphabet_data[4:12])
530 b = struct.unpack('B', alphabet_data[offset : offset + 1])[0]
535 n_entries = struct.unpack('<I', alphabet_data[4:8])[0]
537 entry = struct.unpack('<I', alphabet_data[8 + 4 * i: 8 + 4 * i + 4])[0]