Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Support unpacking HeapByteBfuferR #861

Copy link
Copy link
@takaaki7

Description

@takaaki7
Issue body actions

Currently MessagePack.newDefaultUnpacker(ByteBuffer buffer) doesn't support HeapByteBuffer

When passing Read Only ByteBuffer, following exception happened. Because HeapByteBfuferR.hashArray() and HeapByteBfuferR.isDirect() returns false.

throw new IllegalArgumentException("Only the array-backed ByteBuffer or DirectBuffer is supported");

https://github.com/msgpack/msgpack-java/blob/main/msgpack-core/src/main/java/org/msgpack/core/buffer/MessageBuffer.java#L400

I want to unpacking HeapByteBufferR without copying bytes. Because I save msgpack data in BigTable, and BigTable library returns ByteString, and it only able to be no-copy converted to HeapByteBufferR with asReadOnlyByteBuffer().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.