Add ability to load data from a buffer

Useful when you already have the data in a buffer.