snapshot

Creates a byte string containing a copy of all the data from this buffer.

This call doesn't consume data from the buffer, but instead copies it.