changeset 536:170b1e852b26

add zlidTest
author riono210
date Wed, 05 Jun 2019 16:26:28 +0900
parents 4be31e107121
children 623e409c976a
files src/main/java/jp/ac/u_ryukyu/treevnc/test/ZlibTest.java
diffstat 1 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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();
+    }
+}