Skip to content

Add option to send different randomized blocks #1907

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

davidBar-On
Copy link
Contributor

Add a second option to -l to specify number of different (randomized) blocks to send. The purpose is that not all sent blocks will be the same, and as the blocks contents is randomized by default, network compression will not have an effect.

Test, that stored the received data for 1KB blocks into a file, shows that when sending the same block contents, zip of the file achieves more than 99% compression. On the other hand, when the block contents repeats only every 100 blocks, zip achieves almost no compression.

The change includes also initializing a stream buffer only when it is a sending stream.

@bmah888
Copy link
Contributor

bmah888 commented Jul 14, 2025

Thanks for the PR, we'll take a look!

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