def compact(h3_set)
      h3_set = H3Indexes.with_contents(h3_set)
      out = H3Indexes.of_size(h3_set.size)
      failure = Bindings::Private.compact(h3_set, out, out.size)

      raise "Couldn't compact given indexes" if failure
      out.read
    end
def compact(h3_set)
      h3_set = H3Indexes.with_contents(h3_set)
      out = H3Indexes.of_size(h3_set.size)
      failure = Bindings::Private.compact(h3_set, out, out.size)

      raise "Couldn't compact given indexes" if failure
      out.read
    end
Compact a set of H3 indexes as best as possible.

 In the case where the set cannot be compacted, the set is returned unchanged.

 @param [Array<Integer>] h3_set An array of valid H3 indexes.

 @example Compact the given set.
   h3_set = [
     617700440073043967, 617700440072781823, 617700440073568255, 617700440093229055,
     617700440092704767, 617700440100569087, 617700440074092543, 617700440073830399,
     617700440074354687, 617700440073306111, 617700440013012991, 617700440013275135,
     617700440092180479, 617700440091656191, 617700440092966911, 617700440100831231,
     617700440100044799, 617700440101617663, 617700440081956863
   ]
   H3.compact(h3_set)
   [
     617700440093229055, 617700440092704767, 617700440100569087, 617700440013012991,
     617700440013275135, 617700440092180479, 617700440091656191, 617700440092966911,
     617700440100831231, 617700440100044799, 617700440101617663, 617700440081956863,
     613196840447246335
   ]

 @raise [RuntimeError] Couldn't attempt to compact given H3 indexes.

 @return [Array<Integer>] Compacted set of H3 indexes.