If the value is 127 or fewer bytes long, then the length is specified in a
single byte. Thus, for example, a 32-bit integer is encoded as a 1-byte type,
a 1-byte length, and the 4 bytes that encode the integer, as illustrated in
Figure 7.8. The value itself, in the case of an integer, is represented in twos
complement notation and big-endian form, just as in XDR. Keep in mind
that, even though the value of the integer is represented in exactly the
same way in both XDR and ASN.1, the XDR representation has neither the
type nor the length tags associated with that integer. These two tags both
take up space in the message and, more importantly, require processing
during marshalling and unmarshalling. This is one reason why ASN.1 is
not as efficient as XDR. Another is that the very fact that each data value
is preceded by a length field means that the data value is unlikely to fall on
a natural byte boundary (e.g., an integer beginning on a word boundary).
This complicates the encoding/decoding process.