Class: Yajl::Deflate::StreamWriter
- Defined in:
- lib/yajl/deflate/stream_writer.rb
Overview
A wrapper around the Zlib::Deflate class for easier JSON stream parsing
Class Method Summary collapse
-
.encode(obj, io) ⇒ Object
A helper method for one-off encoding to a deflate-compressed stream.
Instance Method Summary collapse
-
#write(str) ⇒ Object
A helper method to allow use similar to IO#write.
Class Method Details
Instance Method Details
#write(str) ⇒ Object
A helper method to allow use similar to IO#write
7 8 9 10 |
# File 'lib/yajl/deflate/stream_writer.rb', line 7 def write(str) deflate(str) str.size unless str.nil? end |