private static unsafe void InitBlockSplitIterator(BlockSplitIterator *self, BlockSplit *split) { self->split_ = split; self->idx_ = 0; self->type_ = 0; self->length_ = split->lengths != null ? split->lengths[0] : 0; }
private static unsafe void BlockSplitIteratorNext(BlockSplitIterator *self) { if (self->length_ == 0) { ++self->idx_; self->type_ = self->split_->types[self->idx_]; self->length_ = self->split_->lengths[self->idx_]; } --self->length_; }