Connected: An Internet Encyclopedia
RFC 1832 - 2. BASIC BLOCK SIZE

Top: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1832
Prev: 1. INTRODUCTION
Next: 3. XDR DATA TYPES

### 2. BASIC BLOCK SIZE

The representation of all items requires a multiple of four bytes (or 32 bits) of data. The bytes are numbered 0 through n-1. The bytes are read or written to some byte stream such that byte m always precedes byte m+1. If the n bytes needed to contain the data are not a multiple of four, then the n bytes are followed by enough (0 to 3) residual zero bytes, r, to make the total byte count a multiple of 4.

We include the familiar graphic box notation for illustration and comparison. In most illustrations, each box (delimited by a plus sign at the 4 corners and vertical bars and dashes) depicts a byte. Ellipses (...) between boxes show zero or more additional bytes where required.

            +--------+--------+...+--------+--------+...+--------+
            | byte 0 | byte 1 |...|byte n-1|    0   |...|    0   |   BLOCK
            +--------+--------+...+--------+--------+...+--------+
            |<-----------n bytes---------->|<------r bytes------>|
            |<-----------n+r (where (n+r) mod 4 = 0)>----------->|

Next: 3. XDR DATA TYPES

Connected: An Internet Encyclopedia
RFC 1832 - 2. BASIC BLOCK SIZE