Define chunk size for `ReadableStream` created by `blob::stream()`

未关闭
#144 12 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
html, wasm
领域
api, documentation

调研方向

从这个 issue 开始,比较讨论中引用的 File API 和 Streams 规范部分。确定哪个规范负责 ReadableStream 的分块大小行为,以及是否可以指定固定的 0x10000 值;当负责的规范和规范性要求达成一致并完成记录后,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Currently regarded as 'Issue 1' I have recently come across a project that forces me to assume the chunk size for the stream. Testing with chromium and firefox, the chunk size appears to be 0x10000 or 65536. I cannot find a reason why it's this particular number.

As I'm making a wasm module, I must allocate memory space when going through files 5GB+ in size. I will allocate 0x10000 bytes for now, but only out of assumption... if there's a browser out there that does not follow this assumption then there will be fatal bugs.

I'm not sure if this is w3c/FileAPI/'s or streams.spec.whatwg.org's jurisdiction. But neither of them has an exact number.

主要语言
HTML
星标
118
派生
52
平均合并
9 天 16 小时
30 天内合并 PR
1

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

w3c/FileAPI 的其他 Issue

查看 w3c/FileAPI 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。