<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shuzo_kino</author_name>
  <author_url>https://blog.hatena.ne.jp/shuzo_kino/</author_url>
  <blog_title>Bye Bye Moore</blog_title>
  <blog_url>https://shuzo-kino.hateblo.jp/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>前回の記事でバイトリテラルを分解するunpackメソッドと対になるpackメソッドを使うと バイトリテラルを結合したり、バイト埋めができたりします。 …………これ、散々苦労したPythonでのバイト列生成では決定版かも……。 実際のところ import struct struct.pack('h', 1) #&gt;&gt; b'\x00\x01' 複数個指定することも可能。 struct.pack('HH', 0xdead,0xbeef) #&gt;&gt; b'\xad\xde\xef\xbe' 参考もと struct --- バイト列をパックされたバイナリデータとして解釈する — Python 3.8.2 ドキ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshuzo-kino.hateblo.jp%2Fentry%2F2020%2F03%2F25%2F235538&quot; title=&quot;structライブラリでバイト列をつくる - Bye Bye Moore&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-03-25 23:55:38</published>
  <title>structライブラリでバイト列をつくる</title>
  <type>rich</type>
  <url>https://shuzo-kino.hateblo.jp/entry/2020/03/25/235538</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
