2008-07-29から1日間の記事一覧

LZO/Ruby

http://lzoruby.rubyforge.org/ http://www.oberhumer.com/opensource/lzo/ http://storehouse.sakura.ne.jp/viewvc/viewvc.cgi/lzoruby/?root=svn 「mixi Engineers’ Blog » 圧縮データベースを使おう」を読んで、面白そうだったので作ってみた。 以前はラ…

LZO/Ruby: 圧縮してみる

きちんと圧縮できてるか不安だったので、ちょっと動作確認。 require 'lzoruby' open('index.html', 'rb') do |fin| open('index.html.lzo', 'wb') do |fout| fout << LZO.compress(fin.read) end end open('index.html.lzo', 'rb') do |fin| open('index.ht…