code: public void compress() {
          resizeLock.lock();
          try {
              AtomicShortIntBackingArray s = store.get();
              if (s instanceof AtomicShortIntUniformBackingArray) {
                  return;
              }
              int unique = s.getUnique();
              if (AtomicShortIntPaletteBackingArray.roundUpWidth(unique - 1) >= s.width()) {
                  return;
              }
              if (unique > AtomicShortIntPaletteBackingArray.getAllowedPalette(s.length())) {
                  return;
              }
              if (unique == 1) {
                  store.set(new AtomicShortIntUniformBackingArray(s));
              } else {
                  store.set(new AtomicShortIntPaletteBackingArray(s, length, true, false, unique));
              }
          } finally {
              resizeLock.unlock();
          }
      }
docs: Attempts to compress the array