Sha256: 5b6ebfd89aa6b3f124caf77aa7f4e3298b06a8cc8973fe6b6f55d8679e521918

Contents?: true

Size: 528 Bytes

Versions: 9

Compression:

Stored size: 528 Bytes

Contents

module Zip
  class PassThruCompressor < Compressor #:nodoc:all
    def initialize(outputStream)
      super()
      @outputStream = outputStream
      @crc = Zlib::crc32
      @size = 0
    end
    
    def << (data)
      val = data.to_s
      @crc = Zlib::crc32(val, @crc)
      @size += val.size
      @outputStream << val
    end

    attr_reader :size, :crc
  end
end

# Copyright (C) 2002, 2003 Thomas Sondergaard
# rubyzip is free software; you can redistribute it and/or
# modify it under the terms of the ruby license.

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
rubyzip-0.9.7 lib/zip/pass_thru_compressor.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/rubyzip-0.9.6.1/lib/zip/pass_thru_compressor.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/rubyzip-0.9.6.1/lib/zip/pass_thru_compressor.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/rubyzip-0.9.6.1/lib/zip/pass_thru_compressor.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/rubyzip-0.9.6.1/lib/zip/pass_thru_compressor.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/rubyzip-0.9.6.1/lib/zip/pass_thru_compressor.rb
rubyzip-0.9.6.1 lib/zip/pass_thru_compressor.rb
rubyzip-0.9.5 lib/zip/pass_thru_compressor.rb
mezza-rubyzip-0.9.4.1 lib/zip/pass_thru_compressor.rb