This document describes Tight Decoder which is commercially available from the TightVNC developers.

Who Can Benefit?

This page is addressed to authors and copyright holders of VNC-compatible client software. If you sell a sort of VNC-capable viewer for some device, or distribute such a remote control client as a part of your bigger software product, you might be interested in adding our Tight Decoder to your software. If that is the case, please read this entire page.

What is Tight Decoder?

The RFB protocol as used in VNC and TightVNC defines "encodings" as algorithms/formats used to encode graphics (pixel data). TightVNC uses its own highly-efficient method of compressing graphics optimized for low bandwidth. It's called "Tight encoding". Tight encoding includes both efficient "lossless" compression and optional "lossy" JPEG compression.

We offer a separate Tight Decoder written in pure C. It can be useful if you already have a proprietary VNC-compatible client which does not support Tight/JPEG encodings and you would like to add such support. It's a pure C library, very easy to use and integrate into any C or C++ program.

Why It's Important to Support Tight Encoding?

Currently, there are only two free VNC-compatible servers available that can work correctly in modern Windows systems. That's TightVNC and UltraVNC. Unfortunately, the original free version of VNC does not work in Windows Vista or Windows 7, and even does not support Fast User Switching feature of Windows XP.

And both TightVNC and UltraVNC support Tight encoding. In other words, ALL free VNC-compatible servers apt to work under modern Windows systems do support Tight encoding. If your viewer does not support it yet, it may operate inefficiently, or sometimes very inefficiently, when connected to such servers. Probably your users will notice that.

And the fix is simple — purchase our proven implementation of Tight Decoder and integrate it into your software (we made special efforts to make this part as easy as possible). Tight Decoder was authored by Constantin Kaplinsky who as well is the creator of the Tight encoding itself, so this can be considered the original reference implementation.

What Are the License Terms?

What we offer is a perpetual non-exclusive license to the complete source code of Tight Decoder. It costs 800 U.S. dollars. This price is quite reasonable — writing your own analog of Tight Decoder would be many times more expensive and also would take significant amount of time which could be spent much better.

Note that you purchase a license once and forever. No expiration dates, no per-copy royalties, no limitations on the number of products or devices. Please see more details on the license terms in the Annex 2, below.

How To Proceed?

If you are interested in purchasing Tight Decoder, please contact us at the following e-mail address:

Also, we'll be happy to answer all your questions and will appreciate your constructive feedback. Just send us a message to the e-mail address above.

Thank you!

Annex 1: The Technical Point of View

Below you can see a simplified example of using the decoder. The example does not deal with initialization and cleanup, memory allocation or error handling, it just demonstrates the basic idea of using the decoder. Here it how that looks like:

#include <tight-decoder.h>
...
 
{
  TIGHT_DECODER decoder;   /* structure maintaining the state of the decoder */
  char buf[BIG_NUMBER];    /* in real programs, don't use fixed-size buffers */
  int num_bytes;
  ...
 
    /* For each rectangle: */
    num_bytes = tight_decode_start(&decoder, x, y, width, height);
    while (num_bytes > 0) {
      ...
      /* Read num_bytes to buf[] here. */
      ...
      num_bytes = tight_decode_continue(&decoder, buf);
    }
    if (num_bytes < 0) {
      /* Handle errors. */
    }
    /* Rectangle has been decoded successfully. */
 
  ...

As you can see from the example, you should call tight_decode_start() in the beginning of each rectagle. Then call tight_decode_continue() repeatedly until that rectangle is finished. Both functions return the number of bytes you should read into a buffer prior to calling tight_decode_continue() next time. If that number of bytes is zero, the rectangle decoding has been completed successfully. On errors, -1 will be returned.

Simple, is not it? ;)

Annex 2: Basic License Terms

Below you can see a quote from the License Agreement which defines basic terms and conditions.

  1. Author grants Licensee a perpetual, non-exclusive, non-transferable world-wide license to use Software for creating Derivative Works based on the Source Code or integrated with the Software in any other way.
  2. Author grants Licensee the right to distribute (via sublicense), sell (via sublicense) or otherwise transfer (via sublicense) Derivative Works in binary object code format (including executable files and DLL libraries), free of per-copy royalties to the Author.
  3. No part of the Source Code may be distributed, except for limited distribution to Licensee's employees or contractors working on creating Derivative Works for Licensee. Licensee should protect the Source Code from unauthorized distribution by arranging appropriate non-disclosure agreements, by securing all internally used copies of the Source Code, and in other reasonable ways.
  4. Licensee must preserve copyright notices in all files of the Source Code.
  5. Licensee shall not include "TightVNC", "GlavSoft", name of the Author or similar phrases in titles of Licensee's products or services.
  6. All rights not expressly granted in this License are reserved by the Author.

The complete text of the License Agreement is available on request. Please send your inquiries by e-mail. Here is the address:

Thank you!