Skip to content

Add zero-copy Unmarshal#389

Merged
klauspost merged 1 commit intotinylib:masterfrom
klauspost:unmarshal-zerocopy
Mar 10, 2025
Merged

Add zero-copy Unmarshal#389
klauspost merged 1 commit intotinylib:masterfrom
klauspost:unmarshal-zerocopy

Conversation

@klauspost
Copy link
Collaborator

Adds zerocopy tag that will allow byte slices to be unmarshaled with zero-copy, referencing the original slice.

AFAICT not possible for other types or when decoding.

Adds `zerocopy` tag that will allow byte slices to be unmarshaled with zero-copy, referencing the original slice.

AFAICT not possible for other types or when decoding.
@klauspost klauspost requested a review from philhofer March 9, 2025 23:03
@philhofer
Copy link
Member

LGTM.

(Not an issue with this PR per se, but perhaps we should document all of these field tags in the go doc output. There has been quite a proliferation of them and some of them have rather subtle behavioral implications.)

@klauspost
Copy link
Collaborator Author

@philhofer I have been updating the wiki with all the stuff merged from myself and other contributors.

It should be pretty much caught up with functionality. Not really sure where to reasonably add stuff to godoc.

@klauspost klauspost merged commit 4dfdcb5 into tinylib:master Mar 10, 2025
4 checks passed
glycerine added a commit to glycerine/greenpack that referenced this pull request Mar 16, 2025
@klauspost klauspost deleted the unmarshal-zerocopy branch March 17, 2025 10:52
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