# HG changeset patch # User riono210 # Date 1559719588 -32400 # Node ID 170b1e852b26bd25122e5fdb107ee32e08f3e366 # Parent 4be31e10712142d58b2e1c92302bfeab875e866e add zlidTest diff -r 4be31e107121 -r 170b1e852b26 src/main/java/jp/ac/u_ryukyu/treevnc/test/ZlibTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/test/ZlibTest.java Wed Jun 05 16:26:28 2019 +0900 @@ -0,0 +1,29 @@ +package jp.ac.u_ryukyu.treevnc.test; + + +import com.glavsoft.rfb.encoding.decoder.ZRLEDecoder; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.zip.Deflater; + +public class ZlibTest { + private ZRLEDecoder zrleDecoder; + private Deflater deflater; + + public void zlibTest() throws IOException { + deflater = new Deflater(); + ByteBuffer input = ByteBuffer.allocate(64 * 1024); + ByteBuffer output + while (System.in.available() > 0) { + int length = System.in.read(input.array(), input.position(), input.remaining()); + input.position(input.position() + length); + + } + } + + + public static void main(String args[]) throws IOException { + new ZlibTest().zlibTest(); + } +}