WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
283065
Support BYOB byte streams
https://bugs.webkit.org/show_bug.cgi?id=283065
Summary
Support BYOB byte streams
Adam Zielinski
Reported
2024-11-13 10:44:24 PST
WebKit doesn't seem to fully support the following BYOB stream APIs: * ReadableByteStreamController * ReadableStreamBYOBReader * ReadableStream.getReader({ mode: "byob" }); For example, this code snippet errors out: ```js const readableStream = new ReadableStream({ type: 'bytes', }); const reader = readableStream.getReader({ mode: 'byob' }); ``` I'm a WordPress core committer sponsored by Automattic to work on WordPress Playground [1] – a version of WordPress that runs in browsers, CLI, etc. via WebAssembly. Most Playground applications are about instructing WordPress to preinstall specific plugins and themes. This works by downloading a ZIP file, decompressing it, and running the plugin installation hooks. Buffering the entire ZIP file before decompressing it can be slow, so we developed a JavaScript library to stream-decompress ZIP files [2]. Unfortunately, it relies on BYOB stream support and doesn't work in Safari. I've tried many different ways of getting the stream decompression to work in Safari in a way that can still interop with other readable and writable streams, but they all failed [3]. The next best solution is using stream decompression in Firefox and Chrome and falling back to noticeably slower buffering and decompression in Safari. However, I would really like Safari users to have the same good experience with WordPress Playground as folks using other browsers. Playground is becoming an important part of the WordPress ecosystem and have been used by hundreds of thousands of people in the community. [1]
https://w.org/playground
[2]
https://github.com/WordPress/wordpress-playground/blob/trunk/packages/php-wasm/stream-compression/src/zip/decode-zip.ts
[3]
https://github.com/WordPress/wordpress-playground/pull/1799
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-11-13 23:17:56 PST
<
rdar://problem/139856071
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug