10.7 Buffers

The fz_buffer structure is used to represent arbitrary buffers of data. Essentially they are a representation for arbitrary blocks of bytes (in whatever encoding required), with simple functions for extending, concatenating, and writing in byte, char, utf8 and bitwise fashion.

Both the internals and API level functions of MuPDF use fz_buffers extensively.

The usual reference counting behaviour applies to fz_buffers, with fz_keep_buffer and fz_drop_buffer claiming and releasing references respectively.