Why is HTTP / 2 binary, and HTTP 1.1 text? In my opinion, they are both binary, because the computer does not have artificial intelligence and does not understand the text as such.
Question posted in Artificial Intelligence
ChatGBT is becoming a world-wide phenomena, try it out here.
ChatGBT is becoming a world-wide phenomena, try it out here.
2
Answers
A binary protocol is a protocol which is intended to be read by a machine rather than a human being, as opposed to a plain text protocol such as IRC, SMTP, or HTTP. Binary protocols have the advantage of terseness, which translates into speed of transmission and interpretation.
Source: https://en.wikipedia.org/wiki/Binary_protocol
Ultimately everything a (non-quantum) computer holds in its memory is expressed in binary. This very sentence is stored as bits in some SQL server somewhere in a data center.
However, some bytes can be expressed as characters, while others can not. A textual format (such as source code files or other plaintext file formats) will be entirely human-readable, because all its bytes compose characters.
This is different for a binary format. Binary is not meant to be human-readable, so if you’d open an HTTP/2 stream in a text editor such as Notepad, you’d see a lot of question marks or black squares.
That’s because HTTP/2 uses compression, and compression urges to make the most use of all available bits, while text doesn’t.