<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>GegegeMokeke</author_name>
  <author_url>https://blog.hatena.ne.jp/GegegeMokeke/</author_url>
  <blog_title>エンジニアの低脳っぷりを晒す戦記</blog_title>
  <blog_url>https://gegegemokeke.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>読む必要があったので読んでみた 簡単ですね。でも調べても結構出てこないような気もします Rubyistに言わせれば余裕ですかｗ Rubyでは簡単でしたけど、僕は結構苦労しました↓Ruby/バイナリファイルを読むサンプルコード #ファイルを開く puyopuyo = open(&quot;./hoge&quot;) #windowsの場合はバイナリファイルを扱う場合binmodeにしないと途中からデータがズレる、 puyopuyo.binmode while(hoge = puyopuyo.read(4)) #符号付32bit（4バイト）int型で解釈 moge = hoge.unpack(&quot;i*&quot;) print …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgegegemokeke.hatenadiary.org%2Fentry%2F20070522%2Fp1&quot; title=&quot;Rubyでバイナリファイルを読む - エンジニアの低脳っぷりを晒す戦記&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>2007-05-22 00:00:00</published>
  <title>Rubyでバイナリファイルを読む</title>
  <type>rich</type>
  <url>https://gegegemokeke.hatenadiary.org/entry/20070522/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
