Describe the zlibhex encoding in terms of the hextile encoding.
Signed-off-by: Peter Rosin <p...@lysator.liu.se>
(I'm not all satisfied with the double^Wtripple reference to zlib...)
Cheers,
Peter
diff --git a/rfbproto.rst b/rfbproto.rst
index 896fb8b..363d0d0 100644
--- a/rfbproto.rst
+++ b/rfbproto.rst
@@ -1220,6 +1220,7 @@ Number Name
1 `CopyRect Encoding`_
2 `RRE Encoding`_
5 `Hextile Encoding`_
+8 `zlibhex Encoding`_
16 `ZRLE Encoding`_
-239 `Cursor Pseudo-encoding`_
-223 `DesktopSize Pseudo-encoding`_
@@ -1234,7 +1235,6 @@ Number Name
4 CoRRE
6 zlib
7 tight
-8 zlibhex
15 TRLE
17 Hitachi ZYWRLE
-1 to -222
@@ -1449,6 +1449,52 @@ least-significant specify the Y position. The
most-significant four
bits of *width-and-height* specify the width minus one, the
least-significant specify the height minus one.
+zlibhex Encoding
+----------------
+
+The zlibhex encoding uses zlib [#]_ to optionally compress
+subrectangles according to the `Hextile Encoding`_. Refer to the
+hextile encoding for information on how the rectangle is divided into
+subrectangles and other basic properties of subrectangles. One zlib
+"stream" object is used for subrectangles encoded according to the
+**Raw** subencoding and one zlib "stream" object is used for all other
+subrectangles.
+
+.. [#] see http://www.gzip.org/zlib/
+
+The hextile subencoding bitfield is extended with these bits:
+
+=============== ======= =========== ===================================
+No. of bytes Type [Value] Description
+=============== ======= =========== ===================================
+1 ``U8`` *subencoding-mask*:
+.. 32 **ZlibRaw**
+.. 64 **Zlib**
+=============== ======= =========== ===================================
+
+If either of the **ZlibRaw** or the **Zlib** bit is set, the
+subrectangle is compressed using zlib, like this:
+
+=============== =================== ===================================
+No. of bytes Type Description
+=============== =================== ===================================
+2 ``U16`` *length*
+*length* ``U8`` array *zlibData*
+=============== =================== ===================================
+
+Like the **Raw** bit in hextile, the **ZlibRaw** bit in zlibhex cancels
+all other bits and the subrectangle is encoded using the first zlib
+"stream" object. The *zlibData*, when uncompressed, should in this case
+be interpreted as the **Raw** data in the hextile encoding.
+
+If the **Zlib** bit is set, the rectangle is encoded using the second
+zlib "stream" object. The *zlibData*, when uncompressed, represents a
+plain hextile rectangle according to the lower 5 bits in the
+subencoding.
+
+If neither the **ZlibRaw** nor the **Zlib** bit is set, the
+subrectangle follows the rules described in the `Hextile Encoding`_.
+
ZRLE Encoding
-------------
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
tigervnc-rfbproto mailing list
tigervnc-rfbproto@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-rfbproto