Files
Pyarmor-Static-Unpack-1shot/tests/input/test_raise_varargs.py

8 lines
284 B
Python
Raw Normal View History

2025-07-04 19:12:55 +05:30
import struct
def bytes_to_words(b):
'''Convert a byte string (little-endian) to a list of 32-bit words.'''
if len(b) % 4 != 0:
raise ValueError('Input bytes length must be a multiple of 4 for word conversion.')
return struct.unpack('<' + 'I' * (len(b) // 4), b)