decodeComments(block) {
    let offset = 0;
  
    const vLength = block.readUInt32LE(offset);
    const vendor = block.toString('utf8', (offset += 4), (offset += vLength));
  
    const cLength = block.readUInt32LE(offset);
    const comments = new Array(cLength);
  
    offset += 4;
  
    for (let index = 0; index < cLength; index++) {
      const length = block.readUInt32LE(offset);
  
      comments[index] = block.toString('utf8', (offset += 4), (offset += length));
    }
  
    return {
      vendor,
      comments
    };
  }
/**
   *
   * Also known as FLAC tags, the contents of a vorbis comment packet as specified here
   * [http://www.xiph.org/vorbis/doc/v-comment.html] (without the framing bit).
   * Note that the vorbis comment spec allows for on the order of 2 ^ 64 bytes of data
   * where as the FLAC metadata block is limited to 2 ^ 24 bytes.
   *
   * Given the stated purpose of vorbis comments, i.e. human-readable textual information,
   * this limit is unlikely to be restrictive.
   *
   * Also note that the 32-bit field lengths are little-endian coded according to the vorbis spec,
   * as opposed to the usual big-endian coding of fixed-length integers in the rest of FLAC.
   *
   */


Given the stated purpose of vorbis comments, i.e. human-readable textual information,
this limit is unlikely to be restrictive.

Also note that the 32-bit field lengths are little-endian coded according to the vorbis spec,
as opposed to the usual big-endian coding of fixed-length integers in the rest of FLAC.
Given the stated purpose of vorbis comments i . e . human - readable textual information this limit is unlikely to be restrictive . Also note that the 32 - bit field lengths are little - endian coded according to the vorbis spec as opposed to the usual big - endian coding of fixed - length integers in the rest of FLAC .
decodeComments(block) {
    let offset = 0;
    const vLength = block.readUInt32LE(offset);
    const vendor = block.toString('utf8', (offset += 4), (offset += vLength));
    const cLength = block.readUInt32LE(offset);
    const comments = new Array(cLength);
    offset += 4;
    for (let index = 0; index < cLength; index++) {
      const length = block.readUInt32LE(offset);
      comments[index] = block.toString('utf8', (offset += 4), (offset += length));
    }
    return {
      vendor,
      comments
    };
  }
decodeComments ( block ) { let offset = 0 ; const vLength = block . readUInt32LE ( offset ) ; const vendor = block . toString ( 'utf8' , ( offset += 4 ) , ( offset += vLength ) ) ; const cLength = block . readUInt32LE ( offset ) ; const comments = new Array ( cLength ) ; offset += 4 ; for ( let index = 0 ; index < cLength ; index ++ ) { const length = block . readUInt32LE ( offset ) ; comments [ index ] = block . toString ( 'utf8' , ( offset += 4 ) , ( offset += length ) ) ; } return { vendor , comments } ; }
Also known as FLAC tags, the contents of a vorbis comment packet as specified here
 [http://www.xiph.org/vorbis/doc/v-comment.html] (without the framing bit).
Also known as FLAC tags the contents of a vorbis comment packet as specified here [ http : // www . xiph . org / vorbis / doc / v - comment . html ] ( without the framing bit ) .