forked from I2P_Developers/i2p.i2p
SSU2: Compress large RIs in Session Confirmed
even if they would fit in the MTU uncompressed, to save bandwidth and room for other blocks
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
2022-03-13 zzz
|
||||
2022-03-15 zzz
|
||||
* SSU2: Fixes
|
||||
|
||||
2022-03-13 zzz
|
||||
* SSU2: Fixes, stubs for relay and peer test (phase 2)
|
||||
|
||||
2022-03-12 zzz
|
||||
* SSU2: Fixes
|
||||
* Tunnels: Reduce build reply timeout
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Git";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 8;
|
||||
public final static long BUILD = 9;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
@ -469,7 +469,9 @@ class PacketBuilder2 {
|
||||
if (numFragments * max != info.length)
|
||||
numFragments++;
|
||||
|
||||
if (numFragments > 1) {
|
||||
// try to reduce bandwidth and leave room for other blocks by gzipping
|
||||
// if it is large, even if it would strictly fit
|
||||
if (numFragments > 1 || info.length > 1000) {
|
||||
byte[] gzipped = DataHelper.compress(info, 0, info.length, DataHelper.MAX_COMPRESSION);
|
||||
if (gzipped.length < info.length) {
|
||||
if (_log.shouldWarn())
|
||||
|
Reference in New Issue
Block a user