Title: msgpack-core v07 API by xerial · Pull Request #82 · msgpack/msgpack-java · GitHub
Open Graph Title: msgpack-core v07 API by xerial · Pull Request #82 · msgpack/msgpack-java
X Title: msgpack-core v07 API by xerial · Pull Request #82 · msgpack/msgpack-java
Description: I wrote a draft code of msgpack-core for v07, which is a low-level module for reading/writing data in the Message Pack format (https://github.com/msgpack/msgpack/blob/master/spec.md). Please review the design of this msgpack-core API in terms of the performance, usability and class/method naming. After the review I will add some test code to complete the implementation. The goal of msgpack-core is to provide a low-level packer and unpacker implementation that is faster than v06. So, several rich functions (e.g., Template generation, JSON support) will not be implemented in msgpack-core v07. msgpack-core API includes the following classes: MessageBuffer For reading/writing primitive type values in a memory getXXX for reading values, putXXX for writing values This class uses sun.misc.Unsafe API to read the data in memory as fast as possible The specification of message pack requires writing short/int/float/long/double values in big-endian. The default implementation translates little-endian values into big-endian. MessageBufferBE that does not translate the endian will be used for big-endian machine. This API tries to remove invokeinterface call to achieve the highest performance. So MessageBuffer does not implement any interface, and also to avoid the cost of TypeProfile lookup in JVM, only one of MessageBuffer or MessageBufferBE classes is loaded at runtime (using reflection). MessagePacker packInt, packBoolean, ... for writing message-packed values writePayload for writing binary/raw string data MessageBufferOutput Used in MessagePacker to output message-packed data to a stream or buffer This is an adapter to OutputStream or WritableByteChannel MessageUnpacker unpackInt, unpackBoolean, ... for reading message-packed values readPayload for reading binary/raw string data To read message pack data, first call getMessageType. The user need to select an appropriate unpackXXX method according to the given MessageType (enum). MesasgeBufferInput Used in MessageUnpacker to retrieve a sequence of MessageBuffer that contains message packed data This is an adapter to InputStream or ReadableByteChannel MesasgePackException The base class of all message-pack exceptions. MessageTypeException for type mismatch errors MessageFormatException for invalid inputs MessageFormat Enum definition that covers all of the format types in the specification ValueType ValueType represents a group of MessageFormats. For example ValueType.INTEGER is a group of MessageFormat.INT8, INT16, .. UINT8, etc. MessagePack Provides utility methods for creating packer and unpacker.
Open Graph Description: I wrote a draft code of msgpack-core for v07, which is a low-level module for reading/writing data in the Message Pack format (https://github.com/msgpack/msgpack/blob/master/spec.md). Please review...
X Description: I wrote a draft code of msgpack-core for v07, which is a low-level module for reading/writing data in the Message Pack format (https://github.com/msgpack/msgpack/blob/master/spec.md). Please review...
Opengraph URL: https://github.com/msgpack/msgpack-java/pull/82
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1260d8e1-b6d9-f7dd-eff7-fa400f7dce99 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | EE36:19E50:3D400:52152:6A545D57 |
| html-safe-nonce | 8e2f7c8b0d73e2a50e5c78c728a25db9c5bbbf14b3ebc061db1ce352fc56a067 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRTM2OjE5RTUwOjNENDAwOjUyMTUyOjZBNTQ1RDU3IiwidmlzaXRvcl9pZCI6Ijc2MDQ5Nzg4NjYzMDI3NzA1MTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e20c8470324cc2c1dcd4adebaf441797068d57f3bd313dd2c2df5305d86e4f10 |
| hovercard-subject-tag | pull_request:15727083 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/msgpack/msgpack-java/pull/82/files |
| twitter:image | https://avatars.githubusercontent.com/u/57538?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/57538?s=400&v=4 |
| og:image:alt | I wrote a draft code of msgpack-core for v07, which is a low-level module for reading/writing data in the Message Pack format (https://github.com/msgpack/msgpack/blob/master/spec.md). Please review... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/msgpack/msgpack-java git https://github.com/msgpack/msgpack-java.git |
| octolytics-dimension-user_id | 198264 |
| octolytics-dimension-user_login | msgpack |
| octolytics-dimension-repository_id | 1971346 |
| octolytics-dimension-repository_nwo | msgpack/msgpack-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1971346 |
| octolytics-dimension-repository_network_root_nwo | msgpack/msgpack-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6d28624802c2f7d9500239dd6870ed7031b7353b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width