# HG changeset patch
# User riono
# Date 1581502189 -32400
# Node ID 11ae87fed30d49f21fefc94769aa95b785a7f55f
# Parent  b2bcfcfbfc1cbb83f81deaf6a0f924b28ff4cc7d
debug

diff -r b2bcfcfbfc1c -r 11ae87fed30d src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java
--- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java	Wed Feb 12 17:18:24 2020 +0900
+++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java	Wed Feb 12 19:09:49 2020 +0900
@@ -162,7 +162,10 @@
 				if (!deflater.needsInput()) {
 					// packet full
 					flushDeflator();
-					prevoffset = flushOffset+(int)deflater.getBytesRead();
+					int bytesRead = (int)deflater.getBytesRead();
+					ReceiverTask.dump("get bytesRead ",bytes, flushOffset+bytesRead - 8, 20);
+					System.out.println();
+					prevoffset = flushOffset+bytesRead;
 					assert(prevoffset==offset);
 					System.out.println("od prevOffset = "+prevoffset+" span = "+(prevoffset-flushOffset));
 					if (c0rect!=null) { flushRectangle(c0rect); moveNext(); } // finish pahse 1
diff -r b2bcfcfbfc1c -r 11ae87fed30d src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java	Wed Feb 12 17:18:24 2020 +0900
+++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java	Wed Feb 12 19:09:49 2020 +0900
@@ -416,9 +416,9 @@
         }else {
             System.out.println("Bytes is not equal length "+buf.remaining()+" - "+span + " = " + (buf.remaining() - span));
         }
-        dump("in  ",bytes,flushOffset,8); dump("... ",bytes,flushEnd-8,8);
+        dump("in  ",bytes,flushOffset,8); dump("... ",bytes,flushEnd-20,40);
         System.out.println();
-        dump("out ",buf.array(),buf.position(),8); dump(" ",buf.array(),buf.limit()-8,8);
+        dump("out ",buf.array(),buf.position(),8); dump("... ",buf.array(),buf.limit()-20,40);
         System.out.println();
     }