FastestSmallestTextEncoderDecoder icon indicating copy to clipboard operation
FastestSmallestTextEncoderDecoder copied to clipboard

The fastest smallest Javascript polyfill for encodeInto of TextEncoder, encode of TextEncoder, and decode of TextDecoder for UTF-8 only.

Results 9 FastestSmallestTextEncoderDecoder issues
Sort by recently updated
recently updated
newest added

I'm executing this polyfill in v8, and getting: ``` TypeError: Cannot read property 'allocUnsafe' of undefined ``` It's coming from this line: ``` var NativeBuffer_allocUnsafe = NativeBuffer["allocUnsafe"]; ``` Commenting out...

At https://github.com/anonyco/FastestSmallestTextEncoderDecoder/blob/master/individual/FastestTextDecoderPolyfill.src.js#L52 the input Uint8Array sometimes carry a non-zero byteOffset, which is needed to get the correct underlying ArrayBuffer. ``` > var aaa = new Uint8Array(new TextEncoder().encode("wrong hello").buffer, 6); >...

```html const bytes = [50,65,113,117,121,81,111,98,118,68,76,43,77,110,73,90,49,100,43,77,65,71,119,87,68,82,115,57,74,54,117,97,79,78,120,74,119,54,88,113,120,86,99]; var allBytes = new Uint8Array(16777216); // write some A's to the beginning for (var i = 100 - 1; i >= 0; i--) { allBytes[i]...

Fixes https://github.com/anonyco/FastestSmallestTextEncoderDecoder/issues/12

it's happening

Here is the warning: ``` WARNING in /app/node_modules/fastestsmallesttextencoderdecoder/EncoderDecoderTogether.min.js Module Warning (from /app/node_modules/source-map-loader/index.js): (Emitted value instead of an instance of Error) Cannot find SourceMap 'https://cdn.jsdelivr.net/gh/AnonyCo/FastestSmallestTextEncoderDecoder/EncoderDecoderTogether.min.js.map': Error: Can't resolve './https://cdn.jsdelivr.net/gh/AnonyCo/FastestSmallestTextEncoderDecoder/EncoderDecoderTogether.min.js.map' in '/app/node_modules/fastestsmallesttextencoderdecoder'...

Hey Jack! Thank you again for this amazing library! I'n using parts of the code in https://github.com/Bnaya/objectbuffer V8 and other js engines are trying to deduplicate strings references, and also...

I believe this property is required as part of the specification -- https://encoding.spec.whatwg.org/#dom-textencoder-encoding but I can not see it being set in this polyfill. ```js new TextEncoder().encoding === 'utf-8' ```

We noticed encoding issues using this library in production, and after some investigation it turns out there's a correctness issue in the library. I took the [official WPT testcases](https://github.com/web-platform-tests/wpt/tree/master/encoding) and...

To support Worklets we have to consider `globalThis`. Basically: https://github.com/anonyco/FastestSmallestTextEncoderDecoder/blob/f04c88cf11024672e4d3e3dd59b9530b50eefbed/EncoderDecoderTogether.src.js#L453 has to be changed to: ```js })(typeof global == "" + void 0 ? typeof self == "" + void...