code: private static short[] makeDecodingTable(final short[] encodingTable, final int numByteValues) {
      final short[] decodingTable = new short[4096];
  
      for (int byteValue = 0; byteValue < numByteValues; byteValue++) {
        final int encodingEntry = encodingTable[byteValue] & 0xFFFF;
        final int codeValue = encodingEntry & 0xfff;
        final int codeLength = encodingEntry >> 12;
        final int decodingEntry = (codeLength << 8) | byteValue;
        final int garbageLength = 12 - codeLength;
        final int numCopies = 1 << garbageLength;
  
        for (int garbageBits = 0; garbageBits < numCopies; garbageBits++) {
          final int extendedCodeValue = codeValue | (garbageBits << codeLength);
          decodingTable[extendedCodeValue & 0xfff] = (short) decodingEntry;
        }
      }
      return (decodingTable);
    }
docs: Given an encoding table that maps unsigned bytes to codewords
  of length at most 12, this builds a size-4096 decoding table.
  
  <p>The second argument is typically 256, but can be other values such as 65.
  @param encodingTable unsigned
  @param numByteValues size of encoding table
  @return one segment of the decoding table