Zlib in Ruby to uncompress .gz

前端 未结 2 730
面向向阳花
面向向阳花 2020-12-09 22:23

I have a .gz file that contains an XML document. Does anyone know how to use Zlib properly? So far, I have the following code:

require \'zlib\'
Zlib::GzipRea         


        
2条回答
  •  被撕碎了的回忆
    2020-12-09 22:47

    Here is a Ruby one-liner ( cd .git/ first and identify path to any object ):

    ruby -rzlib -e 'print Zlib::Inflate.new.inflate(STDIN.read)' < ./74/c757240ec596063af8cd273ebd9f67073e1208
    

提交回复
热议问题