-
Notifications
You must be signed in to change notification settings - Fork 143
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
Unsure to merge: Compress blocks and txs as well #761
Conversation
[changelog skip]
Codecov Report
@@ Coverage Diff @@
## master #761 +/- ##
==========================================
+ Coverage 86.4% 86.48% +0.08%
==========================================
Files 222 223 +1
Lines 19218 19273 +55
==========================================
+ Hits 16605 16669 +64
+ Misses 1419 1410 -9
Partials 1194 1194
|
I guess it's okay that we contain this feature and can also drop out when it is obvious that it is not necessary or harmful to features. |
deflate.Flush(); | ||
buffer.Flush(); | ||
int length = (int)buffer.Position; | ||
var output = new byte[length]; |
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.
Can we use buffer.ToArray()
instead of temp variable(output
)?
deflate.Flush(); | ||
outputBuffer.Flush(); | ||
int length = (int)outputBuffer.Position; | ||
var output = new byte[length]; |
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.
Can we use outputBuffer.ToArray()
instead of temp variable(output
)?
As this patch does not solve the problem and is likely to make the code more complicated, I decided to do not merge this. |
This patch is continued from #753. Besides block states, this compresses blocks and txs as well. Unfortunately, the compression rate is almost the same to #753 (5.1G → 1.6G).