< start of output buffer
< position where writing stopped. Will be updated. Necessarily 0 <= pos <= size
< size of output buffer
See Implementation