static void WriteObjectArray(PivotDataStateBinaryWriter wr, object[] arr)
 {
     wr.Write7BitEncodedLong((ulong)arr.Length);
     for (long i = 0; i < arr.Length; i++)
     {
         WriteObject(wr, arr[i]);
     }
 }
 static void WriteValueKeys(PivotDataStateBinaryWriter wr, uint[][] valueKeys, uint dimCount)
 {
     wr.Write7BitEncodedLong((ulong)valueKeys.Length);
     for (int i = 0; i < valueKeys.Length; i++)
     {
         for (int j = 0; j < dimCount; j++)
         {
             wr.Write7BitEncodedInt(valueKeys[i][j]);
         }
     }
 }