added logic to use a 64k buffer to read write files for huffman encoding