9. Bug ID: 4206909
? http://bugs.sun.com/view_bug.do?bug_id=4206909
? Synopsis: want java.util.zip to work for
interactive use (Z_SYNC_FLUSH)
? Submit Date: 28-JAN-1999
? Reported Against: 1.2, 1.3, 1.1.7, 1.1.8
? Release Fixed: 7(b77)
? State: 10-Fix Delivered, request for
enhancement
10. Bug ID: 4206909
? Description:
^Today it is not possible to reuse
java.util.zip for compression because the
Java VM calls deflate() in the libz with
Z_NO_FLUSH (and Z_FINISH for EOF)
only. ̄
11. Bug ID: 4206909
? Description:
^ This means that in most cases the
deflate() does not emit enough data for
the decompressor to reassemble the
complete data packet because it waits for
more input. ̄
12. Bug ID: 4206909
? java.util.zip パッケ`ジ
C Deflater
匯違議な ZLIB Rsライブラリを聞喘して喘のRs
アルゴリズムをサポ`ト
C Inflater
匯違議な ZLIB Rsライブラリを聞喘して喘のRs
盾茅をサポ`ト
C InflaterInputStream
C DeflaterOutputStream
19. JZlib
? _kのC
SSHのパケットRs[RFC4253]gFのため
^The 'zlib' compression is described in
[RFC1950] and in [RFC1951].The
compression context is initialized after each
key exchange, and is passed from one packet
to the next, with only a partial flush being
performed at the end of each packet. ^
20. JZlib
? JZlibを聞っているソフトウェア
C JSch
C Apache MINA
C Netty
C Zimbra
C as3zlib
C Zlib.cs
C IronPython.Zlib
C Nokia Data Gathering 吉
27. 皆額鰻遺喝酷晦雨皆堰の聞喘箭
scala> val defl_infl = {
import java.util.zip._
val (defl, infl, buf) = (new Deflater, new Inflater, new Array[Byte](100))
def f(in: String): String = synchronized {
in.getBytes match {
case result =>
defl.setInput(result)
defl.deflate(buf, 0, buf.length, Deflater.SYNC_FLUSH) match{
case l => l は buf にき竃されたRsデ`タのサイズ
//
infl.setInput(buf, 0, l)
val len = infl.inflate(result, 0, result.length)
new String(result, 0, len)
}}} // ちゃんとg廾するには、嶄gバッファ(buf)の吝れに廣吭
f_ // また、阜瘁のバッファ吝れにも廣吭すべき
}