Skip to content

ZBytes::chunks #1847

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 8 commits into
base: main
Choose a base branch
from
Open

ZBytes::chunks #1847

wants to merge 8 commits into from

Conversation

fuzzypixelz
Copy link
Member

This function allows for splitting contiguous ZBytes into chunks without cloning the underlying buffer.

@fuzzypixelz fuzzypixelz added the new feature Something new is needed label Mar 20, 2025
@fuzzypixelz fuzzypixelz changed the title Zbytes::chunks ZBytes::chunks Mar 20, 2025
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 83.58209% with 11 lines in your changes missing coverage. Please review.

Project coverage is 71.46%. Comparing base (16ba77c) to head (edadf31).
Report is 19 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
commons/zenoh-buffers/src/zbuf.rs 81.96% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1847      +/-   ##
==========================================
+ Coverage   70.92%   71.46%   +0.53%     
==========================================
  Files         360      363       +3     
  Lines       65175    66663    +1488     
==========================================
+ Hits        46225    47640    +1415     
- Misses      18950    19023      +73     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Mallets
Copy link
Member

Mallets commented Mar 20, 2025

I'm not sure to understand the use case behind this PR. Can you elaborate?

@fuzzypixelz
Copy link
Member Author

I'm not sure to understand the use case behind this PR. Can you elaborate?

I believe @OlivierHecart needed to "fragment" ZBytes in advanced pub/sub.

@Mallets
Copy link
Member

Mallets commented Mar 21, 2025

Then I believe it should be implemented on a ZBuf leaving the ZSlice untouched.

@fuzzypixelz
Copy link
Member Author

fuzzypixelz commented Mar 25, 2025

Then I believe it should be implemented on a ZBuf leaving the ZSlice untouched.

See 0c10522.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Something new is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants