Skip to content

Instantly share code, notes, and snippets.

@tmaeda
Created April 29, 2011 18:10
Show Gist options
  • Save tmaeda/948740 to your computer and use it in GitHub Desktop.
Save tmaeda/948740 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'zlib'
require 'rexml/document'
File.open("CONTENT.tda") do |zipped_f|
File.open("CONTENT.tda.tdz", "r") do |index_f|
while record = index_f.read(8)
size = record.unpack("V*")[1]
puts size
z_content = zipped_f.read(size)
content = Zlib::Inflate.inflate(z_content)
puts "########################################"
content.split(/\0+/).each do |chunk|
begin
doc = REXML::Document.new chunk
doc.write(STDOUT, 2)
rescue
puts chunk
end
end
end
end
end
topic_maps.skn: なんかバイナリが入ってるな
fs.skn: 辞書内容っぽい
topic.skn: よくわからん。テキストなんだけど、fs.sknに比べると情報が少ない気がする。
extras.skn: なんか.psのような.pdfのようなデータが入ってる
help.skn: 名前の通りヘルプっぽい
@sdomermpc
Copy link

but where does this file go? i mean output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment