Sha256: 70e3fbcdcb87618dd3daf9c0a35e09ae1288a35001f1a80b95c62615f1536a60

Contents?: true

Size: 392 Bytes

Versions: 26

Compression:

Stored size: 392 Bytes

Contents

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

26 entries across 26 versions & 9 rubygems

Version Path
yajl-ruby-1.1.0-x86-mswin32-60 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-1.1.0-x86-mingw32 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-1.1.0 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-1.0.0-x86-mswin32-60 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-1.0.0-x86-mingw32 lib/yajl/bzip2/stream_writer.rb
yajl-ruby-1.0.0 lib/yajl/bzip2/stream_writer.rb