Simplified API slightly by taking ownership of the IO Buffer instead of being passed a reference