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
8 9 10 11 |
# File 'lib/yajl/deflate/stream_writer.rb', line 8 def write(str) deflate(str) str.size unless str.nil? end |