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