Skip to content

Fix hamcore building with incorrect file size#3

Merged
chipitsine merged 1 commit into
SoftEtherVPN:masterfrom
synqa:fix-hamcore-build-size
Mar 3, 2026
Merged

Fix hamcore building with incorrect file size#3
chipitsine merged 1 commit into
SoftEtherVPN:masterfrom
synqa:fix-hamcore-build-size

Conversation

@synqa
Copy link
Copy Markdown
Contributor

@synqa synqa commented Feb 25, 2026

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.

@synqa synqa marked this pull request as draft February 26, 2026 04:28
@synqa synqa force-pushed the fix-hamcore-build-size branch 2 times, most recently from b4441c2 to 9990278 Compare March 1, 2026 08:52
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.
@synqa synqa force-pushed the fix-hamcore-build-size branch from 9990278 to 8df2a5e Compare March 1, 2026 14:40
@synqa
Copy link
Copy Markdown
Contributor Author

synqa commented Mar 1, 2026

master:
screenshot-2026-03-01-23-50-26

this PR:
screenshot-2026-03-01-23-51-12

hamcore.se2 size was reduced from 5MB to 2.85MB and all tests passed :)

@synqa synqa marked this pull request as ready for review March 1, 2026 22:39
@chipitsine chipitsine merged commit fb8d497 into SoftEtherVPN:master Mar 3, 2026
6 checks passed
@chipitsine
Copy link
Copy Markdown
Member

honestly, test suite is very-very-very small.

@synqa
Copy link
Copy Markdown
Contributor Author

synqa commented Mar 3, 2026

@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?

@synqa synqa deleted the fix-hamcore-build-size branch March 3, 2026 23:39
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
@synqa synqa mentioned this pull request Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants