docs: public final long reverse(long value, int maxBits) {
          long res = 0;
          for (; maxBits > 0; value >>>= 1) {
              res <<= 1;
              res |= value & 1;
              maxBits--;
              if (value == 0) {
                  res <<= maxBits;
                  break;
              }
          }
          return res;
      }