private int readHeader( char[] chunkData, int pos )
	{
		int start = pos;
		pos += readStates( chunkData, pos );
		// read id and version
		if ( chunkData[pos] == ':' &&(states.isParent() || states.isChild()
            ||states.isMerged()) )
		{
			pos += 1;	// no, ++pos doesn't work
			pos += readId( chunkData, pos );
		}
		if ( chunkData[pos] == ':' && states.isFound() )
		{
			pos += 1;
			pos += readVersion( chunkData, pos );
		}
		return ++pos - start;
	}