I am trying to read binary file into a list of bytes. I was looking into this thread but it only gives me an array of characters.
How do I convert string characters into a list?
More or less what I want is this:
with open("decompressed_data.bin", mode='rb') as file:
fileContent = file.read()
myStrList = list(fileContent)
# then convert this to a list of integers directly.
myIntList = convertToIntList(myStrList)
Is there a way to convert this list of characters into a list of integers without looping through every character?
Better yet, can I read the binary file direct into a list of integers the Python way?