This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19639 - API: decode step 3 should reference buffer's byteLength
Summary: API: decode step 3 should reference buffer's byteLength
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: Encoding (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+encodingspec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-19 16:32 UTC by Joshua Bell
Modified: 2012-10-30 17:13 UTC (History)
1 user (show)

See Also:


Attachments

Description Joshua Bell 2012-10-19 16:32:28 UTC
An ArrayBufferView is typically a "window" onto an ArrayBuffer |buffer| starting at |byteOffset| for |byteLength| bytes; the buffer may start before the offset and continue past the length.

decode() step 3 says:

If input is given, append the bytes from input's buffer, starting at input's byteOffset, to the stream.

Since this is going into detail about input's |buffer| and |byteOffset| it should probably mention |byteLength| as well, e.g.:

If input is given, then given input's buffer, byteOffset and byteLength, append byteLength bytes from buffer starting at byteOffset to the stream.