Home

Add a comment

 

Avatar: Anonymous

nodejs error ?

Haha thanks for the information, I don't know very mucht about UTF8 / UTF-16

Socket.io don't support binary yet :(
If you think its easy to create a compressToUTF8() than I say :)

I quick compression check gives me this

msg = {data:'I say hello'}
console.log('no compression',JSON.stringify(msg).length)
compr = LZString.LZString.compressToUTF16(JSON.stringify(msg));
console.log('compression',compr.length);

no compression 22
compression 17
 

msg = {data:'I say hello, I can say more and more text so this is big'}
console.log('no compression',JSON.stringify(msg).length)
compr = LZString.LZString.compressToUTF16(JSON.stringify(msg));
console.log('compression',compr.length);

<div> <div>no compression 67</div> <div>compression 37</div> <div> </div> <div>As you can see there is some compression.</div> <div> </div> <div>But if I understand you correct , you can make more compression using compressToUTF8() ?
 </div> </div>

nodejs error ?


Title
Body
HTML : b, strong, i, em, blockquote, br, p, pre, a href="", ul, ol, li, sub, sup
OpenID Login
Name
E-mail address
Website
Remember me Yes  No 

E-mail addresses are not publicly displayed, so please only leave your e-mail address if you would like to be notified when new comments are added to this blog entry (you can opt-out later).

Home