def write_octet(self, n, pack=Struct('B').pack):
        """
        Write an integer as an unsigned 8-bit value.
        """
        if 0 <= n <= 255:
            self._output_buffer.append(pack(n))
        else:
            raise ValueError('Octet %d out of range 0..255', n)
        return self