Thanks for helping me with this haha, its hard to understand it :)
What i'm testing right now is this: Sending message function(){
msg = JSON.stringify(args[1]); compres = LZString.LZString.compressToBase64(msg);
if(Buffer.byteLength(compres, 'base64')<Buffer.byteLength(msg, 'utf8')){
<span class="Apple-tab-span" style="white-space:pre"> </span>console.log('COMPRESSION');
args = ['event',{compr:compres}];
}
http://nodejs.org/api/buffer.html#buffer_class_method_buffer_bytelength_string_encoding
So it checks if the compression is smaller then the utf-8 message.
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).