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

Return the amount of bytes deserialized #6

Open
simonzack opened this issue Dec 29, 2014 · 4 comments
Open

Return the amount of bytes deserialized #6

simonzack opened this issue Dec 29, 2014 · 4 comments

Comments

@simonzack
Copy link

An option to do this would be great, if there's multiple amf objects in a piece of data.

@dannykopping
Copy link
Contributor

Could you elaborate a bit more on this?
Where would you need this feature, and could you provide a use-case?

@simonzack
Copy link
Author

I'm using your library to write a sol library for js (localstorage for swf files). SOL concats multiple amf objects together and it's hard to tell where the next one starts.

In fact, also having an argument to the starting position within the string to parse from would be ideal, since parsing would be more efficient that way.

@dannykopping
Copy link
Contributor

Can you not put delimiters between the multiple AMF objects? Or push them all into an array, so that you can pull them apart later? The library does support encoding of raw bytestreams, so this should work fine.

I don't really understand the reasoning behind this, so I'm not terribly inclined to include it - but if you could submit a PR with your suggestion and a concrete example where you shouldn't just stick all the streams into an array like I suggested, I'll definitely take a closer look.

@simonzack
Copy link
Author

See the sol file format here. The file format itself for the large part simply concatenates multiple AMF objects together, so there's no way to tell the boundaries. Delimiters would violate the file format.

I'll submit a PR.

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