When I used lief to slice elf text to decode, iced-x86 told me that only bytes and bytearray are supported. Apparently, for lief, memoryview slice could be more performant and low-level-oriented. Currently, I must use bytes() to convert memoryview object to bytes so that iced can accept it.
Looking into Python docs, it seems that memoryview can be a container of array, not just bytes objects. And the memory can be even not contiguous?
A simple repro:
from iced_x86 import Decoder
Decoder(64, memoryview(b'\xc3'))
It would be nice if iced can support memoryview Decoder.
When I used lief to slice elf text to decode, iced-x86 told me that only
bytesandbytearrayare supported. Apparently, for lief, memoryview slice could be more performant and low-level-oriented. Currently, I must usebytes()to convert memoryview object to bytes so that iced can accept it.Looking into Python docs, it seems that memoryview can be a container of array, not just bytes objects. And the memory can be even not contiguous?
A simple repro:
It would be nice if iced can support memoryview Decoder.