code: public void set(int[] palette, int blockArrayWidth, int[] variableWidthBlockArray) {
          resizeLock.lock();
          try {
              if (palette.length == 0) {
                  store.set(new AtomicShortIntDirectBackingArray(length, variableWidthBlockArray));
              } else if (palette.length == 1) {
                  store.set(new AtomicShortIntUniformBackingArray(length, palette[0]));
              } else {
                  store.set(new AtomicShortIntPaletteBackingArray(length, palette, blockArrayWidth, variableWidthBlockArray));
              }
          } finally {
              resizeLock.unlock();
          }
      }
docs: Sets the array equal to the given palette based array.  The main array should be the same length as this array
  
  @param palette the palette, if the palette is of length 0, variableWidthBlockArray contains the data, in flat format
  @param blockArrayWidth the with of each entry in the main array
  @param variableWidthBlockArray the array containing the new values, packed into ints