code: private static int pack7Oid(byte[] in, int ioffset, int ilength, byte[] out, int ooffset) {
          byte[] pack = pack(in, ioffset, ilength, 8, 7);
          int firstNonZero = pack.length-1;   // paste at least one byte
          for (int i=pack.length-2; i>=0; i--) {
              if (pack[i] != 0) {
                  firstNonZero = i;
              }
              pack[i] |= 0x80;
          }
          System.arraycopy(pack, firstNonZero, out, ooffset, pack.length-firstNonZero);
          return pack.length-firstNonZero;
      }
docs: Repack from NUB 8 to a NUB 7 OID sub-identifier, remove all
  unnecessary 0 headings, set the first bit of all non-tail
  output bytes to 1 (as ITU-T Rec. X.690 8.19.2 says), and
  paste it into an existing byte array.
  @param out the existing array to be pasted into
  @param ooffset the starting position to paste
  @return the number of bytes pasted