w3c / w3c/FileAPI

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

Open
#144 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
118
Forks
52
Avg merge
9d 16h
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with this issue and compare the File API and Streams specification sections referenced in the discussion. Determine which specification owns the ReadableStream chunk-size behavior and whether a fixed 0x10000 value can be specified; done means the responsible specification and normative requirement are agreed and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, wasm
Domain
api, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.