Sha256: 82c8ff12970552f24662b6618d43c983447aa17ddd7c8a2a43e52dd7c9255a1f

Contents?: true

Size: 410 Bytes

Versions: 14

Compression:

Stored size: 410 Bytes

Contents

# encoding: UTF-8
module Yajl
  module Bzip2
    # A wrapper around the Bzip2::Writer class for easier JSON stream encoding
    class StreamWriter < ::Bzip2::Writer

      # A helper method for encoding to a bzip2-compressed stream
      #
      # Look up Yajl::Encoder#encode for parameter documentation
      def self.encode(obj, io)
        Yajl::Encoder.new.encode(obj, new(io))
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
yajl-ruby-0.8.3 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-0.8.2 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-0.8.1 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-0.8.0 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-0.7.9 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-0.7.8 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-0.7.7 lib/yajl/bzip2/stream_writer.rb
benofsky-yajl-ruby-0.7.7 lib/yajl/bzip2/stream_writer.rb
benofsky-yajl-ruby-0.7.6 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-0.7.6 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-0.7.5 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-0.7.4 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-0.7.3 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-0.7.2 lib/yajl/bzip2/stream_writer.rb