code: public static long[] convertToArrayLongs(final Block[] blockArray) {
      long[] blocksAsLongs = new long[blockArray.length * LONGS_PER_BLOCK];
  
      BlockListAsLongs bl = new BlockListAsLongs(blocksAsLongs);
      assert bl.getNumberOfBlocks() == blockArray.length;
  
      for (int i = 0; i < blockArray.length; i++) {
        bl.setBlock(i, blockArray[i]);
      }
      return blocksAsLongs;
    }
docs: Converting a block[] to a long[]
  @param blockArray - the input array block[]
  @return the output array of long[]