-
Notifications
You must be signed in to change notification settings - Fork 67
Parse bytes from Uint8Array #592
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
Comments
This is an important detail. A parser for DEFLATE would need to work bit-by-bit. Ideally the grammar files would be always parsed as UTF8 but definition of different data types (UTF8 string, bytes, bites) should be possible. All data would be internally represented as some sort of raw data instead of Javascript's built-in If you look at https://v8docs.nodesource.com/node-5.12/da/d3d/classv8_1_1_array_buffer_view.html you can see that However, in my testing I noticed that Ideally, it would be a merged version of In the PR #591 I removed all uses of I'm not a compiler expert and have no prior experience building parsers so there might be severe problems with this approach - just wanted to share in case it provides any value. |
DataView is a great building block here. Uint8ClampedArray is likely not needed, since its difference from Uint8Array is only when setting bytes, which the parser likely should never be doing. |
See #591. Allow parsing a Uint8Array directly. Features needed:
$
returns Uint8Array.prototype.subarray slicenew BigUint64Array(4)
?The text was updated successfully, but these errors were encountered: