-
Notifications
You must be signed in to change notification settings - Fork 71
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
streams2 and explicit encodings #16
Conversation
…te lengths and format for strings
Merging because kitten in christmas sweater |
streams2 and explicit encodings
FYI I just published 1.4.0 which makes a slight change to the semantics introduced by this commit. I published this PR as 1.3.0 not realizing it broke backwards compat in the way that default (no encoding set) streams are handled, so 1.4.0 fixes that. Basically if you don't set an explicit encoding it will try to infer encoding, which is how 1.x concat-stream has worked. I may remove inference altogether in 2.0 |
This patch uses streams2 and makes the encodings explicit instead of implicit like before. You can now use the following encodings (with room for more):
All of these encodings should work in all browsers, even if they don't have support for typed arrays natively since this patch uses the typedarray module for
Uint8Array
polyfill. browserify's Buffer module natively already uses the same version, so this module will be duped in the file size output so there isn't any extra file size overhead.