docs: private static void writeLiteralRegex(ByteIterator input, ByteString.Output output) {
      while (input.hasNext()) {
        byte unquoted = input.nextByte();
  
        if ((unquoted < 'a' || unquoted > 'z')
            && (unquoted < 'A' || unquoted > 'Z')
            && (unquoted < '0' || unquoted > '9')
            && unquoted != '_'
            &&
            // If this is the part of a UTF8 or Latin1 character, we need
            // to copy this byte without escaping.  Experimentally this is
            // what works correctly with the regexp library.
            (unquoted & 128) == 0) {
  
          if (unquoted == '\0') { // Special handling for null chars.
            // Note that this special handling is not strictly required for RE2,
            // but this quoting is required for other regexp libraries such as
            // PCRE.
            // Can't use "\\0" since the next character might be a digit.
            output.write(NULL_BYTES, 0, NULL_BYTES.length);
            continue;
          }
  
          output.write('\\');
        }
        output.write(unquoted);
      }
    }