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

Using StreamingUnpacker with files #95

Open
rnowling-adroll opened this issue Jan 24, 2017 · 2 comments
Open

Using StreamingUnpacker with files #95

rnowling-adroll opened this issue Jan 24, 2017 · 2 comments

Comments

@rnowling-adroll
Copy link

Thanks for this great library!

I'm trying to use the StreamingUnpacker with a file for input. The docs for StreamingUnpacker indicate a feed() method can be used to append to the buffer passed to the constructor. However, I don't see this implemented anywhere.

What is the appropriate way to iteratively deserialize multiple msgpack objects stored in file? (I.e., I don't want to read the entire file into memory at once.)

Thanks!

@rnowling-adroll
Copy link
Author

I missed the usage of the mixin for StreamingUnpacker -- feed() is defined there.

A file example would be great, though!

@repeatedly
Copy link
Member

You mean the file version of this example?

https://github.com/msgpack/msgpack-d/blob/master/example/unpacker_foreach.d

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

No branches or pull requests

2 participants