out.write(buf.length + 1);
writeLength(out, buf.length + 1);
  private static int writeBitString(OutputStream out, BitString bs)    throws IOException  {    byte[] buf = bs.getShiftedByteArray();    out.write(buf.length + 1);    out.write(bs.getIgnoredBits());    out.write(buf);    return buf.length;  }