public override void Crack(DataCracker context, BitStream data, long?size) { BitStream sizedData = ReadSizedData(data, size); long startPosition = data.PositionBits; // Handle children, iterate over a copy since cracking can modify the list for (int i = 0; i < this.Count;) { var child = this[i]; context.CrackData(child, sizedData); // If we are unsized, cracking a child can cause our size // to be available. If so, update and keep going. if (!size.HasValue) { size = context.GetElementSize(this); if (size.HasValue) { long read = data.PositionBits - startPosition; sizedData = ReadSizedData(data, size, read); } } int idx = IndexOf(child); if (idx == i) { i = idx + 1; } } if (size.HasValue && sizedData == data) { data.SeekBits(startPosition + size.Value, System.IO.SeekOrigin.Begin); } }