Title: Allow the data alignment to support zero-copy decoding by eddig · Pull Request #248 · msgpack/msgpack-javascript · GitHub
Open Graph Title: Allow the data alignment to support zero-copy decoding by eddig · Pull Request #248 · msgpack/msgpack-javascript
X Title: Allow the data alignment to support zero-copy decoding by eddig · Pull Request #248 · msgpack/msgpack-javascript
Description: An alternative solution for the data alignment proposed in that PR In that proposal, the encode function of the extension codec could return a function that will be called by Encoder at the moment of building the final buffer. The function receives the position of the data in the buffer. The encoder expects to receive data that will be then added to the buffer at the provided position. Users can add the padding bytes straight into the data at the encoding phase and calculate the data offset at the decoding phase depending on the chosen padding+data format. That solution has some advantages over the one mentioned above. It doesn't change the message pack format. The padding "lives" in the data part. It allows a user to decide how to align the data. It doesn't break the compatibility with the existing formats. The drawback is that to resolve the ambiguity of the final size of the data the size field always takes 4 bytes, independent of how big the actual data is. That could be highlighted in the documentation to warn users. That is only a deal in case of returning a function instead of the actual data from the encode function, so the existing users won't be affected.
Open Graph Description: An alternative solution for the data alignment proposed in that PR In that proposal, the encode function of the extension codec could return a function that will be called by Encoder at the moment ...
X Description: An alternative solution for the data alignment proposed in that PR In that proposal, the encode function of the extension codec could return a function that will be called by Encoder at the moment ...
Opengraph URL: https://github.com/msgpack/msgpack-javascript/pull/248
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5057dd9c-13c4-6dc1-63c0-af1568eea247 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B2D4:95C7C:350DF8:472DCA:6A540467 |
| html-safe-nonce | 8f05be7aaddc27550fe0d54f967511877aea338c467e3fbae95deb59468e2483 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkQ0Ojk1QzdDOjM1MERGODo0NzJEQ0E6NkE1NDA0NjciLCJ2aXNpdG9yX2lkIjoiNzcwMzk2NjUyODA1Njg1MzYwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d3c3aeb31f0ca44d77087dda1ebb4ed0c2e23b6a635a9af8e179b55f8308b518 |
| hovercard-subject-tag | pull_request:2300717508 |
| 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-javascript/pull/248/files |
| twitter:image | https://avatars.githubusercontent.com/u/4124316?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4124316?s=400&v=4 |
| og:image:alt | An alternative solution for the data alignment proposed in that PR In that proposal, the encode function of the extension codec could return a function that will be called by Encoder at the moment ... |
| 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-javascript git https://github.com/msgpack/msgpack-javascript.git |
| octolytics-dimension-user_id | 198264 |
| octolytics-dimension-user_login | msgpack |
| octolytics-dimension-repository_id | 2761854 |
| octolytics-dimension-repository_nwo | msgpack/msgpack-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 2761854 |
| octolytics-dimension-repository_network_root_nwo | msgpack/msgpack-javascript |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width