-
Notifications
You must be signed in to change notification settings - Fork 641
[ISSUE #3343]Optimize Codec.Encoder and Codec.Decoder #3344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3344 +/- ##
============================================
+ Coverage 13.04% 13.05% +0.01%
- Complexity 1191 1192 +1
============================================
Files 550 550
Lines 28700 28708 +8
Branches 2850 2850
============================================
+ Hits 3743 3747 +4
- Misses 24632 24636 +4
Partials 325 325
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@lrhkobe please help review this pr. |
| int bodyLength = ArrayUtils.getLength(bodyData); | ||
|
|
||
| int length = 4 + 4 + headerLength + bodyLength; | ||
| int length = headerLength + bodyLength; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line need to change:
int length = CONSTANT_MAGIC_FLAG.length + VERSION.length + headerLength + bodyLength;
| final int length = in.readInt(); | ||
| final int headerLength = in.readInt(); | ||
| final int bodyLength = length - 8 - headerLength; | ||
| final int bodyLength = length - headerLength; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line need to change:
final int bodyLength = length - CONSTANT_MAGIC_FLAG.length - VERSION.length - headerLength;
|
@xwm1992 done, PTAL~ |
Fixes #3343
Motivation
Explain the content here.
Explain why you want to make the changes and what problem you're trying to solve.
Modifications
Optimize Codec.Encoder and Codec.Decoder
Documentation