docs: public byte[] toBytes() throws IOException {
      final ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
      final BitOutputStream out = new BitOutputStream(outBuffer);
      this.write(out);
      out.flush();
      return outBuffer.toByteArray();
    }