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

Make it possible to decode streams of messages #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tarruda
Copy link

@tarruda tarruda commented Dec 5, 2012

  • Exported the 'Decoder' class.
  • Added 'bytesRemaining' property to decoder class.
  • Added a wrapper method for 'Decoder.parse' in order to keep the
    'bytesRemaining' from updating on parse failure.

- Exported the 'Decoder' class.
- Added 'bytesRemaining' property to decoder class.
- Added a wrapper method for 'Decoder.parse' in order to keep the
  'bytesRemaining' from updating on parse failure.
@creationix
Copy link
Owner

Looks neat, do you still want this merged? Not sure how I missed this PR.

@tarruda
Copy link
Author

tarruda commented Jan 11, 2017

Feel free to merge it, but the msgpack spec has evolved and now has a way to distinguish between byte and text strings, so I wouldn't use this library. https://github.com/mcollina/msgpack5 implements the latest version.

In any case, there's a way to design a msgpack parser that is fully reentrant without backtracking(rolling back to previous parse position in case of missing data). This is one of the reasons I have created https://github.com/tarruda/libmpack, but didn't get the time to put together a node.js binding yet.

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