Luc14860 / jwebsocket

Automatically exported from code.google.com/p/jwebsocket
0 stars 0 forks source link

Need encode/decode convenience to interchange binary data (byte arrays). #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We want to interchange binary data between server and client, but due to 
missing support of frame types other than <0x00>data<0xff> we need to 
temporarily provide some encode/decode convenience.

If you send UTF8 data with MSB = 1 Chrome 5.0.375.70 beta does not accept the 
package, however, FlashBridge does.

Original issue reported on code.google.com by fivefeetfurther@gmail.com on 7 Jun 2010 at 1:28

GoogleCodeExporter commented 9 years ago
We are providing base64 encoding/decoding now on both sides which are already 
used for file transfer via web sockets  until the binary transmission in the 
next web socket draft has been specfified.

Original comment by fivefeetfurther@gmail.com on 5 Aug 2010 at 9:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
One way i see to transfer binary data is to escape it so that it can be places 
into a string element (i.e. zero or more Unicode chars in double quotes using 
backslash escapes) in JSON. but when we escape by putting extra characters the 
data size might increase. 

http://en.wikipedia.org/wiki/Yenc this can be handy too to convert binary to 
text.. haven't looked at in detail but looks good. also compression before 
encoding (and after decoding) may be helpful..

Original comment by mailtopu...@gmail.com on 11 Aug 2010 at 7:47

GoogleCodeExporter commented 9 years ago
oh that's what we are already doing :) 

Original comment by mailtopu...@gmail.com on 11 Aug 2010 at 7:51

GoogleCodeExporter commented 9 years ago
We have working base64 encoder. See FileSystemPlugin.
If we expected that the binary protocol release still takes times, we may 
introduce a more compressing solution, but to me for now that seems to be 
low-priority improvement. Let's wait a bit for the binary spec before further 
actions.

Original comment by fivefeetfurther@gmail.com on 9 Sep 2010 at 1:24

GoogleCodeExporter commented 9 years ago

Original comment by fivefeetfurther@gmail.com on 14 Oct 2010 at 2:26