Fix hamcore building with incorrect file size#3
Merged
Conversation
b4441c2 to
9990278
Compare
HamcoreBuild was creating files lager than their actual size. This occurred because buffer_size referred to the size of the buffer allocated during compression, rather than the actual file size(offset). Fix this by specifying the correct file size during the write process.
9990278 to
8df2a5e
Compare
Contributor
Author
Member
|
honestly, test suite is very-very-very small. |
Contributor
Author
|
@chipitsine I see. What kind of tests should I add? Should I increase the number of integration tests, or would it be better to start adding unit tests or something? |
chipitsine
added a commit
to chipitsine/SoftEtherVPN
that referenced
this pull request
Mar 6, 2026
we want to update because of the following improvement SoftEtherVPN/libhamcore#3
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


HamcoreBuild was creating files lager than their actual size. This occurred because buffer_size referred to the size of the buffer allocated during compression, rather than the actual file size(offset). Fix this by specifying the correct file size during the write process.
This issue affects non-Windows platforms where hamcore.se2 contains fewer files.
For example, on x86_64 Linux, Apply this change, reduce the output size of hamcore.se2 from 5.24 MB to 2.98 MB.