docs: public static void writeBytes(OutputStream os, byte[] buf) throws IOException {
          if (buf.length < OP_PUSHDATA1) {
              os.write(buf.length);
              os.write(buf);
          } else if (buf.length < 256) {
              os.write(OP_PUSHDATA1);
              os.write(buf.length);
              os.write(buf);
          } else if (buf.length < 65536) {
              os.write(OP_PUSHDATA2);
              Utils.uint16ToByteStreamLE(buf.length, os);
              os.write(buf);
          } else {
              throw new RuntimeException("Unimplemented");
          }
      }