<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>slashzero</author_name>
  <author_url>https://blog.hatena.ne.jp/slashzero/</author_url>
  <blog_title>~/diary</blog_title>
  <blog_url>https://slashzero.hatenadiary.org/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>プログラム</anon>
  </categories>
  <description>文字エンコーディングと改行コードを適切に変換するようにし、さらになるべく省メモリか高速になる書き方をしたらかなり可読性の低いコードになった……。 具体的には下記のような処理をするようにした。 テキストファイルをバイナリとして開き、先頭1KBくらいから文字エンコーディングを判別する。 正規表現を用いて先頭1KBに取り出したい文字列があるか調べる。あれば取り出す。 先頭1KBに無い場合、先頭2KBに取り出したい文字列があるか調べる。あれば取り出して7へ。 先頭2KBに無い場合、先頭4KBに取り出したい文字列があるか調べる。あれば取り出して7へ。 先頭4KBに無い場合、先頭8KBに取り出したい文字列…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fslashzero.hatenadiary.org%2Fentry%2F20080512%2Fcs&quot; title=&quot; テキストファイルから一部分を取り出すプログラム - ~/diary&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>2008-05-12 00:00:00</published>
  <title> テキストファイルから一部分を取り出すプログラム</title>
  <type>rich</type>
  <url>https://slashzero.hatenadiary.org/entry/20080512/cs</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
