Chris Malek
1/13/2006 7:32:00 AM
I am running on windows xp and trying to inflate a string and decode
it. I am getting a
When I try to execute this script I get the following error:
deflateBase64.rb:11: uninitialized constant Zlib (NameError)
Ruby Version: 1.8.2
##########################################
require 'base64'
f = File.open("c:/temp/string.txt","r")
fout = File.open("c:/temp/decodedString","w")
fout.puts(Zlib::VERSION )
while (ln = f.gets)
inflatedString = Zlib::Inflate.inflate ln
decodeString = Base64.decode64(inflatedString)
fout.puts(decodeString)
f.close
fout.puts("closing")
fout.close
end
##########################################
Anyone have any idea?
Thanks in advance.