#include <cat.h>
int catbuf_overwrite(cat_buffer *b, int pos, int length, const void *data)
catbuf_overwrite() overwrites data in a buffer, starting at pos, and extending the buffer length by length, a number of bytes. The buffer length is not extended outside the current size of the buffer. The index is unaffected.
catbuf_copy() performs the corresponding static read operation.