On 02/14/2012 10:40 AM, Alon Levy wrote: <SNIP>
Other then that looks good, and like you say probably better - although I'm not convinced that by checking several common desktop compression programs you are checking whatever compression scheme vpn's are using.
VPNs usually use DEFLATE (which is close to gzip). Both SSL/TLS and IPsec do, at least. Y.
But it's probably a good indication of the compressability.+ /* this produces ascending and descending byte runs which vary in offset + * every 512 bytes, preventing prevents compression from being able to + * influence the resulting size of the ping data too much */ + for(i = 0; i< size; i++) { + div_t result = div(i, 256); + if(result.quot % 2 == 0) { + ping_data[i] = (result.quot + 1) * result.rem; + } else { + ping_data[i] = 512 - (result.quot * result.rem); + } } + + spice_marshaller_add(m, ping_data, size); } void main_channel_push_mouse_mode(MainChannel *main_chan, int current_mode, -- 1.7.9 _______________________________________________ Spice-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/spice-devel_______________________________________________ Spice-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/spice-devel
_______________________________________________ Spice-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/spice-devel
