Bye Bye Moore

PoCソルジャーな零細事業主が作業メモを残すブログ

2020-03-24から1日間の記事一覧

バイトリテラル列の分解

実際のところ 標準ライブラリstructのunpackメソッドを使います。 import struct struct.unpack('8B', b'\xff\xf8\x00\x00\x00\x00\x00\x00')[0] #>> 255 struct.unpack('8B', b'\xff\xf8\x00\x00\x00\x00\x00\x00')[1] #>> 248 参考もと python - What does…