Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am still unsure about the distinction. I know that formats have definitions for symbols that represent data and how data is structured.

share|improve this question
    
A format would be a shape, and a protocol would be how you shape it. –  Ƭᴇcʜιᴇ007 Apr 1 at 17:44

2 Answers 2

up vote 3 down vote accepted

Format - applies to files

Protocol - applies to communications

In both instances you are talking about the index of various bytes in a stream and what they are supposed to represent.

Protocol can get more involved, as many protocols work in a "request-response" fashion where the client issues a well-formed request, and then a server responds with a well-formed response. So there may be different schema for request, response. Requests may change client or server "state" and thus the schema may be different again given a particular state.

File formats are typically always following the same schema unless they are a different version, though they can be complex as well - later bytes in a file format may depend on earlier bytes (the .PST file format or the Windows Registry hive format, for example).

share|improve this answer

A format describes the structure of some data, whereas a protocol defines a procedure to handle this data. If you take TCP as an example, you have a definition of the format of a data packet, which tells you at which bit position a specified field like the checksum of a packet starts and ends, and the protocol defines that for opening a TCP connection you need three packets, one from client to server with the SYN-bit set, a second one from server to client with ACK- and SYN-bit set and a third one with ACK-bit set from client to server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.