From 55dee43279f3374fde433fbeffb798fa9e609a32 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Fri, 27 Aug 2010 12:10:09 -0500 Subject: [PATCH] Remove psuedo-UTF8 encoding. It's less efficient on average that base64 (150% vs 133%). It's non-standard (0 shifted to 256 before encoding). And I rarely use it. --- docs/TODO | 3 +- docs/proxy_description.txt | 14 ------ include/default_controls.js | 7 --- include/rfb.js | 35 ++------------ tests/ws.html | 5 +- tests/wsencoding.html | 4 -- utils/websocket.c | 92 +++++-------------------------------- utils/websocket.h | 4 -- utils/websocket.py | 30 ++---------- vnc_auto.html | 1 - 10 files changed, 20 insertions(+), 175 deletions(-) diff --git a/docs/TODO b/docs/TODO index 83be322..cd2c12b 100644 --- a/docs/TODO +++ b/docs/TODO @@ -1,7 +1,6 @@ Short Term: -- Timing delta between frames in proxy record log, for playback - support (for demo and test). +- Add realtime playback of recordings. - Playback/demo on website. diff --git a/docs/proxy_description.txt b/docs/proxy_description.txt index 218078a..83dfb1c 100644 --- a/docs/proxy_description.txt +++ b/docs/proxy_description.txt @@ -32,20 +32,6 @@ the proxy to add sequence numbers to every WebSockets frame so that the browser can reorder them. -UTF-8 encoding: - -In addition to the base64 encoding of the data, the proxy also -supports UTF-8 encoding of the data (the native WebSockets encoding). -However, in order to not burden the browser too much, the encoding -doesn't use the full UTF-8 value space, but only uses the first 256 -values. This actually makes UTF-8 encoding slightly less space -efficient than base64. Also, flash cannot handle byte arrays with 0's -in them properly, so the values are actually 1-256 (rather than 0-255) -and the browser does modulus 256 on the data. For these two reasons, -base64 is the default and is indicated in the GET string by -"base64=1". - - Flash security policy: The proxy detects flash security policy requests (again by sniffing diff --git a/include/default_controls.js b/include/default_controls.js index 8a05ad6..c842491 100644 --- a/include/default_controls.js +++ b/include/default_controls.js @@ -45,8 +45,6 @@ load: function(target) { html += '