MemBuffer.offset is the current amount of data in the buffer.  Its pretty much just a translation of the following macro

#define MemBufferPrintToFPAsString(mem_buffer, fp) ({                           \
    fwrite((mem_buffer)->buffer, sizeof(uint8_t), (mem_buffer)->offset, fp);    \
})