This diff adds a few convenience functions to deal with Uint8Arrays.
Details
- Reviewers
atul marcin ashoat - Commits
- rCOMM52b2f012cccb: [lib] Add utilities for Uint8Array data
Added unit tests
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
lib/media/data-utils.js | ||
---|---|---|
48–53 ↗ | (On Diff #24299) | If possible, preference to always "rewrite with inspiration"... ie. open up the 2nd link, open up your code editor, do not do copy-paste at any point, but instead write it in your own voice, with the other code as inspiration. Some lines (eg. (chunk & 16515072) >> 18) cannot be written any other way, but it is not necessarily a license violation to have that same line if it is the only way to write it If you don't feel like that is possible in this case, then you should separate the code that is copy-pasted into a separate file, ideally in a folder that clearly indiciates it is copy-pasted (eg. folder named third-party, for instance) and include the LICENSE directly above the code. This isn't as good since we'll have to find some way to include it in acknowledgements (once we implement that) and may forget it, but if there is no alternative then it's acceptable |
Requesting changes to either "rewrite with inspiration" or to move copy-pasted code to a third-party folder with the license
lib/media/data-utils.js | ||
---|---|---|
48–53 ↗ | (On Diff #24299) | I'll go with the separate-file 3rd party solution because I'm going to replace it with native code anyway. I don't want to waste time rewriting this. |
Moved the 3rd-party function to a separate file and attached license. I'll also create a task to replace this with native code