<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fgshun</author_name>
  <author_url>https://blog.hatena.ne.jp/fgshun/</author_url>
  <blog_title>銀月の符号</blog_title>
  <blog_url>https://fgshun.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>codecs モジュールには先日までは知らなかった、 IncrementalDecoder により一字ずつデコードする機能があった。これにはまだまだ知らないで損している機能があるような気がして、もうすこしさわってみることにした。まずはコーデックの自作と登録から。それもなるべく簡単なヤツで。となると換字式暗号、それも XOR あたりがいいかな。これなら変換部分の実装で困ることはないため、どのような動作をする callable オブジェクトを用意すべきか、そのためにどのようなものが用意されているのか調べるほうに集中できるはず。そうしてできたのが以下の XOR コーデックを作って登録するコード。 f…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffgshun.hatenablog.com%2Fentry%2F20090210%2F1234286792&quot; title=&quot; 「XOR をとるコーデック」のファクトリ - 銀月の符号&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>2009-02-10 02:26:32</published>
  <title> 「XOR をとるコーデック」のファクトリ</title>
  <type>rich</type>
  <url>https://fgshun.hatenablog.com/entry/20090210/1234286792</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
