TigerVNC / tigervnc

High performance, multi-platform VNC client and server
https://tigervnc.org
GNU General Public License v2.0
5.23k stars 952 forks source link

Zstd encoding #945

Open martenf opened 4 years ago

martenf commented 4 years ago

Is your feature request related to a problem? Please describe. zlib and deflate are old and slow. Zstd is a faster and modern almost drop-in replacement.

Describe the solution you'd like Adding a new encoding type that is a copy paste of ZRLE, but using Zstd instead of zlib.

martenf commented 4 years ago

I talked with the maintainer of UltraVNC about the same topic and we added (and a currently still working on /talking about it) a test patch at https://sourceforge.net/p/ultravnc/code/commit_browser. See commit 1267 and 1268.

The ZInStream and ZOutStream of both project are nearly identical so the changes might also work for TigerVNC.

As this is a new encoding it might be a good idea to agree on a new encoding number. I created a list of numbers currently in use by various clients as well as my new proposal. Note that the UltraVNC patch currently has no support for pure Zstd encoding (only ZstdRLE and ZstdYW) and leaves no encoding number free for it. That will hopefully change.

CendioOssman commented 4 years ago

Looks promising. Have you considered the alternative of having a pseudo-encoding instead that basically means "Switch all zlib for every encoding to zstd"? Would avoid having to allocate a whole bunch of new numbers. On the other hand there is plenty of room for new numbers...

We don't need to coordinate the numbers between implementations anymore. Simply contact IANA to get an official allocation for the new stuff you need. Patches for @rfbproto is also always welcome. :)