More: Don't use DataHelper.readLong() for 1-byte reads, for efficiency

This commit is contained in:
zzz
2015-11-08 20:43:42 +00:00
parent 1aed266f70
commit 1451dc6ece
12 changed files with 14 additions and 14 deletions

View File

@@ -85,7 +85,7 @@ public abstract class FastI2NPMessageImpl extends I2NPMessageImpl {
throw new I2NPMessageException("Payload is too short " + maxLen);
int cur = offset;
if (type < 0) {
type = (int)DataHelper.fromLong(data, cur, 1);
type = data[cur] & 0xff;
cur++;
}
_uniqueId = DataHelper.fromLong(data, cur, 4);