int nTables = bs.readUBitInt(8); for (int t = 0; t < nTables; t++) { Demo.CDemoStringTables.table_t.Builder tb = b.addTablesBuilder(); tb.setTableName(bs.readString(4095)); int nStrings = bs.readUBitInt(16);
@Override public Demo.CDemoStringTables parse(Source source) throws IOException { BitStream bs = BitStream.createBitStream(ZeroCopy.wrap(readPacket(source))); Demo.CDemoStringTables.Builder b = Demo.CDemoStringTables.newBuilder(); int nTables = bs.readUBitInt(8); for (int t = 0; t < nTables; t++) { Demo.CDemoStringTables.table_t.Builder tb = b.addTablesBuilder(); tb.setTableName(bs.readString(4095)); int nStrings = bs.readUBitInt(16); for (int s = 0; s < nStrings; s++) { readItem(bs, tb.addItemsBuilder()); } if (bs.readBitFlag()) { nStrings = bs.readUBitInt(16); for (int s = 0; s < nStrings; s++) { readItem(bs, tb.addItemsClientsideBuilder()); } } } return b.build(); } @Override