If the specified length is less than 128, write to this stream the one-byte integer comprised of the least-significant one byte of the length; otherwise, write to this stream the four-byte, two's complement integer (in network byte order) comprised of the least-significant four bytes of the length (in host byte order) with the most-significant bit set. Return a reference to this stream. If this stream is initially invalid, this operation has no effect. The behavior is undefined unless 0 <= length.