If you only make the output go left to right, you don't actually save much memory. You're still randomly accessing a huge buffer.