Class: Gelfd::ZlibParser

Inherits:
Object
  • Object
show all
Defined in:
lib/gelfd/zlib_parser.rb

Class Method Summary collapse

Class Method Details

.parse(data) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/gelfd/zlib_parser.rb', line 5

def self.parse(data)
  begin
    t = Zlib::Inflate.inflate(data)
    t
  rescue Exception => e
    raise DecodeError, "Failed to decode data: #{e}"
  end
end