<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>iww</author_name>
  <author_url>https://blog.hatena.ne.jp/iww/</author_url>
  <blog_title>揮発性のメモ２</blog_title>
  <blog_url>https://iww.hateblo.jp/</blog_url>
  <categories>
    <anon>perl</anon>
  </categories>
  <description>バイナリファイルを読む練習。 ファイルの先頭部分を読み込んで、GZIPのヘッダ(0x1F,0x8B,0x08,0x00)を探し、その先頭位置を出力するプログラム。 #!/usr/bin/perl use strict; use warnings; my $size=32768; open( my $fh, $ARGV[0] ) or die(&quot;open&quot;); binmode($fh); read( $fh, my $buf, $size ) or die(&quot;read&quot;); my @d = unpack( &quot;C*&quot;, $buf ); for( my $i=0; $i&lt;$size-4; $i++ …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiww.hateblo.jp%2Fentry%2F20130323%2Funpack&quot; title=&quot; ファイルをバイナリとして読み込む - 揮発性のメモ２&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>2013-03-23 00:00:00</published>
  <title> ファイルをバイナリとして読み込む</title>
  <type>rich</type>
  <url>https://iww.hateblo.jp/entry/20130323/unpack</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
