Class: Yajl::Gzip::StreamWriter

Inherits:
Zlib::GzipWriter
  • Object
show all
Defined in:
lib/yajl/gzip/stream_writer.rb

Overview

Wraper around the Zlib::GzipWriter class

Class Method Summary collapse

Class Method Details

.encode(obj, io) ⇒ Object

A helper method for one-off encoding to a gzip-compressed stream

Look up Yajl::Encoder#encode for parameter documentation



8
9
10
# File 'lib/yajl/gzip/stream_writer.rb', line 8

def self.encode(obj, io)
  Yajl::Encoder.new.encode(obj, new(io))
end