# File lib/innodb/page/index.rb, line 353
  def record_header_compact_null_bitmap(cursor)
    fields = record_fields

    # The number of bits in the bitmap is the number of nullable fields.
    size = fields.count { |f| f.nullable? }

    # There is no bitmap if there are no nullable fields.
    return [] unless size > 0

    null_bit_array = cursor.get_bit_array(size).reverse!

    # For every nullable field, select the ones which are actually null.
    fields.inject([]) do |nulls, f|
      nulls << f.name if f.nullable? && (null_bit_array.shift == 1)
      nulls
    end
  end