-
Notifications
You must be signed in to change notification settings - Fork 42
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
reader: decode message by message #17
Comments
Hi, thanks for your interest in the library. I don´t have time at the moment to make any major changes, but would be happy to take any contributions. I don´t think it´s possible to have a generic decode-one-message-at-a-time function, since the messages can be of different types. A function could return an I have not looked in detail on how to official SDK does this, but I think it uses some kind of message listener for each message type a user is interested in. It may be possible to be something similar for Go, where a user could subscribe to the messages they are interested in, and receive each type of messages on separate channels. The user could then process them in a for-select-loop. A more manageable fix would be to change the semantics of the |
I think returning an empty interface is OK. I see no other way. Anyway it's a great package and I know the effort it must have taken to implement, as i was trying to do the same. I stopped and use yours now! |
I forgot about the order of messages; that is a good point. |
I suppose this is related to encoding (#1) as well, if the goal is a byte-for-byte equal result after a decode-encode round trip. |
Can you decode messages in a loop, instead of decoding the whole file in on call?
An application is a corrupted fit file, where you want to extract all record messages that are available.
The text was updated successfully, but these errors were encountered: