I am trying to convert a 128GB human-readable hexadecimal file in to base 256 binary and then shifting all the bits left by 7.
So far, I have this: http://pastebin.com/raw/giMbciwr
But, it only works for small files but it failed when I tried it on the 128GB file: it kept on adding data to the output file past 64GB.
So, what is wrong with the program I pasted on pastebin, and any suggestions for performance?