Buffer.extractDup

void extractDup(size_t offset, size_t size, out ubyte[] dest)

Extracts a copy of at most size bytes the data at offset into newly-allocated memory. dest must be freed using [glib.global.gfree] when done.

Parameters

offsetthe offset to extract
sizethe size to extract
destA pointer where the destination array will be written. Might be null if the size is 0.