build/components_concat.js
function skipTillGroupEnd(expectedId, buf) {
            var tag = buf.readVarint32(), // Throws on OOB
                wireType = tag & 0x07,
                id = tag >>> 3;
            switch (wireType) {
                case ProtoBuf.WIRE_TYPES.VARINT:
                    do tag = buf.readUint8();
                    while ((tag & 0x80) === 0x80);
                    break;
                case ProtoBuf.WIRE_TYPES.BITS64:
                    buf.offset += 8;
                    break;
                case ProtoBuf.WIRE_TYPES.LDELIM:
                    tag = buf.readVarint32(); // reads the varint
                    buf.offset += tag;        // skips n bytes
                    break;
                case ProtoBuf.WIRE_TYPES.STARTGROUP:
                    skipTillGroupEnd(id, buf);
                    break;
                case ProtoBuf.WIRE_TYPES.ENDGROUP:
                    if (id === expectedId)
                        return false;
                    else
                        throw Error("Illegal GROUPEND after unknown group: "+id+" ("+expectedId+" expected)");
                case ProtoBuf.WIRE_TYPES.BITS32:
                    buf.offset += 4;
                    break;
                default:
                    throw Error("Illegal wire type in unknown group "+expectedId+": "+wireType);
            }
            return true;
        }
function skipTillGroupEnd(expectedId, buf) {
            var tag = buf.readVarint32(), // Throws on OOB
                wireType = tag & 0x07,
                id = tag >>> 3;
            switch (wireType) {
                case ProtoBuf.WIRE_TYPES.VARINT:
                    do tag = buf.readUint8();
                    while ((tag & 0x80) === 0x80);
                    break;
                case ProtoBuf.WIRE_TYPES.BITS64:
                    buf.offset += 8;
                    break;
                case ProtoBuf.WIRE_TYPES.LDELIM:
                    tag = buf.readVarint32(); // reads the varint
                    buf.offset += tag;        // skips n bytes
                    break;
                case ProtoBuf.WIRE_TYPES.STARTGROUP:
                    skipTillGroupEnd(id, buf);
                    break;
                case ProtoBuf.WIRE_TYPES.ENDGROUP:
                    if (id === expectedId)
                        return false;
                    else
                        throw Error("Illegal GROUPEND after unknown group: "+id+" ("+expectedId+" expected)");
                case ProtoBuf.WIRE_TYPES.BITS32:
                    buf.offset += 4;
                    break;
                default:
                    throw Error("Illegal wire type in unknown group "+expectedId+": "+wireType);
            }
            return true;
        }
function skipTillGroupEnd ( expectedId , buf ) { var tag = buf . readVarint32 ( ) , // Throws on OOB
 wireType = tag & 0x07 , id = tag >>> 3 ; switch ( wireType ) { case ProtoBuf . WIRE_TYPES . VARINT : do tag = buf . readUint8 ( ) ; while ( ( tag & 0x80 ) === 0x80 ) ; break ; case ProtoBuf . WIRE_TYPES . BITS64 : buf . offset += 8 ; break ; case ProtoBuf . WIRE_TYPES . LDELIM : tag = buf . readVarint32 ( ) ; // reads the varint
 buf . offset += tag ; // skips n bytes
 break ; case ProtoBuf . WIRE_TYPES . STARTGROUP : skipTillGroupEnd ( id , buf ) ; break ; case ProtoBuf . WIRE_TYPES . ENDGROUP : if ( id === expectedId ) return false ; else throw Error ( "Illegal GROUPEND after unknown group: " + id + " (" + expectedId + " expected)" ) ; case ProtoBuf . WIRE_TYPES . BITS32 : buf . offset += 4 ; break ; default : throw Error ( "Illegal wire type in unknown group " + expectedId + ": " + wireType ) ; } return true ; }
Skips all data until the end of the specified group has been reached.
@param {number} expectedId Expected GROUPEND id
@param {!ByteBuffer} buf ByteBuffer
@returns {boolean} `true` if a value as been skipped, `false` if the end has been reached
@throws {Error} If it wasn't possible to find the end of the group (buffer overrun or end tag mismatch)
@inner
Skips all data until the end of the specified group has been reached .