-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add ol.format.Binary #1717
Add ol.format.Binary #1717
Conversation
It looks great already. I'm intereted in reviewing when this is ready. |
This PR (just |
Any objections to merging this? I've a load of branches that depend on this it's getting really awkward juggling them all. |
no objections from me |
+1 |
Just a very small question. Just a thought |
The readers are in |
Ok, Interesting! But the "much faster" aspect is of course very interesting :-) |
Yes, I'll open an issue on the TWKB repo for feedback and discussion. |
This PR adds binary support to
ol.Format
.Reading binary data is done using
ArrayBuffer
s, if available, otherwise (i.e. on IE9) it falls back to usingVBArray
to create anArray.<number>
, where each array element is a byte. This abstraction is handled byol.binary.Buffer
.Right now, only sequential reading of binary data, byte-by-byte, is supported, via the
ol.binary.IReader
interface. If/when random access is needed, appropriate methods can be added tool.binary.Buffer
.Right now, the only binary format in progress is TWKB. See #1615 and another PR about to be opened.