Browse Source

set max compression for SessionConfirmed

pull/1776/head
orignal 2 years ago
parent
commit
f1d3d6a7b5
  1. 1
      libi2pd/SSU2Session.cpp

1
libi2pd/SSU2Session.cpp

@ -1885,6 +1885,7 @@ namespace transport
else else
{ {
i2p::data::GzipDeflator deflator; i2p::data::GzipDeflator deflator;
deflator.SetCompressionLevel (9);
size = deflator.Deflate (r->GetBuffer (), r->GetBufferLen (), buf + 5, len - 5); size = deflator.Deflate (r->GetBuffer (), r->GetBufferLen (), buf + 5, len - 5);
if (!size) return 0; // doesn't fit if (!size) return 0; // doesn't fit
buf[3] = SSU2_ROUTER_INFO_FLAG_GZIP; // flag buf[3] = SSU2_ROUTER_INFO_FLAG_GZIP; // flag

Loading…
Cancel
Save