From: Thomas Hurst Date: 2002-01-21T00:55:08+09:00 Subject: Archive::Tar and zlib Hi. The good news is I have a minimal tar reader working. The bad news is it's a bit crufty. The good news is it's very small and quite easy to follow. The bad news is Ruby-zlib 0.4 crashes on code like this: ----->8----- #!/usr/pkg/bin/ruby require 'zlib' fp = File.new(ARGV[0]) nfp = File.new(ARGV[1], 'w') zfp = GzipReader.new(fp) while content = zfp.read(512) nfp.write(content) end nfp.close zfp.close fp.close -----8<---- which I happen to use quite a lot :) The worse news is according to sloccount, it's going to cost you $3,970 worth of cookies (not bad for 160 lines of code). -- Thomas 'Freaky' Hurst - freaky@aagh.net - http://www.aagh.net/ - The rain it raineth on the just And also on the unjust fella, But chiefly on the just, because The unjust steals the just's umbrella.