Decrease buffer size to 512kB

Previously used buffer size (1024*1024) worked in the XCode iOS simulator, but crashed on real device (iPhone 5 running iOS 8.1)