<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>19639</bug_id>
          
          <creation_ts>2012-10-19 16:32:28 +0000</creation_ts>
          <short_desc>API: decode step 3 should reference buffer&apos;s byteLength</short_desc>
          <delta_ts>2012-10-30 17:13:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>Encoding</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Bell">jsbell</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
          
          <qa_contact>sideshowbarker+encodingspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>76706</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2012-10-19 16:32:28 +0000</bug_when>
    <thetext>An ArrayBufferView is typically a &quot;window&quot; 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&apos;s buffer, starting at input&apos;s byteOffset, to the stream.

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

If input is given, then given input&apos;s buffer, byteOffset and byteLength, append byteLength bytes from buffer starting at byteOffset to the stream.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76836</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-10-21 11:17:12 +0000</bug_when>
    <thetext>Thanks.

https://github.com/whatwg/encoding/commit/b7bf10477d1bde967988928928fec0697703f768</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>