Skip to content

add the sub-offset operator - #2483

Open
mbKaleb wants to merge 1 commit into
zeek:mainfrom
mbKaleb:topic/mbKaleb/gh-2335-sub-end-offset
Open

add the sub-offset operator#2483
mbKaleb wants to merge 1 commit into
zeek:mainfrom
mbKaleb:topic/mbKaleb/gh-2335-sub-end-offset

Conversation

@mbKaleb

@mbKaleb mbKaleb commented Aug 28, 2026

Copy link
Copy Markdown

Fixes #2335

Added

  • sub-offset operator and corresponding documentation.
  • corresponding test-cases under bytes,stream, and operators, matching convention over coverage.

Tested

  • Complete btest suite: 880 passed, 0 failed, 33 skipped
  • New btest coverage: single-offset sub on bytes and stream views with
    boundary cases (0, mid, full length), a const-operand case, and a
    Spicy-syntax assert (tests/hilti/types/bytes/ops.hlt,
    tests/hilti/types/stream/view.hlt, tests/spicy/types/bytes/operators.spicy)

@codspeed-hq

codspeed-hq Bot commented Aug 31, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 43 untouched benchmarks


Comparing mbKaleb:topic/mbKaleb/gh-2335-sub-end-offset (07d8e33) with main (9274feb)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (877b266) during the generation of this report, so 9274feb was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@mbKaleb

mbKaleb commented Sep 1, 2026

Copy link
Copy Markdown
Author

@evantypanski Any thoughts?

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.

Add bytes.sub(end) and stream.sub(end) without an iterator

1 participant