Skip to content
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

Allow user to specify buffer by adding cbor.MarshalToBuffer(), UserBufferEncMode interface, etc. #553

Merged
merged 1 commit into from
Jun 10, 2024

Commits on Jun 10, 2024

  1. Add UserBufferEncMode interface with MarshalToBuffer()

    This commit adds features related to allowing user to specify
    a buffer rather than using built-in buffer pool:
    
    - cbor.MarshalToBuffer() uses codec's default options to encode
      to user provided buffer instead of using built-in buffer pool.
    
    - UserBufferEncMode interface extends EncMode interface with
      MarshalToBuffer() so user can provide buffer for encoding
      instead of using built-in buffer pool.
    
    - EncOptions.UserBufferEncMode() returns UserBufferEncMode
    
    - EncOptions.UserBufferEncModeWithTags() returns UserBufferEncMode
    
    - EncOptions.UserBufferEncModeWithSharedTags() returns UserBufferEncMode
    fxamacker committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    ed38331 View commit details
    Browse the repository at this point in the history