8000 Support for configurable endianness · Issue #11 · pauloavelar/go-tlv · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support for configurable endianness #11

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

Closed
pauloavelar opened this issue Mar 14, 2021 · 0 comments
Closed

Support for configurable endianness #11

pauloavelar opened this issue Mar 14, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@pauloavelar
Copy link
Owner

Is the feature related to a problem?

Possibly. It feels more logical to transfer data using big-endianness, but some projects may have little-endian data that needs to be parsed. In those cases, this library cannot be used.

Solution

Just like #10, a custom parser may be created with configuration the currently package-level functions bound to it.

Alternatives

Currently, there is a private variable called parser that holds the ByteOrder used by the library. Allowing changes to this variable through a setter function would be the quickest fix. Also see #10 for caveats with multiple parsers with different configuration.

@pauloavelar pauloavelar added the enhancement New feature or request label Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant
0