kvarnerexpress 0 Report post Posted July 13, 2005 Hello All,I am developing a utility for zipping and unzipping a file using the Huffman Algorithm. The code is implemented using 'C' language. I have finished coding for generating the appropriate bit code values for each of the symbols present in file and my next objective is to store the bit code values in a seperate file. As you all are aware, the smallest data type that is supported by C is the character which is 1 byte. Please can anybody suggest me on how to store the bit values generated as codes in a file?Thanks. Share this post Link to post Share on other sites
cse-icons 0 Report post Posted July 14, 2005 hi kvarnerexpress,How are u constructing the string in the first place... u can use & and | operator to create the string and simultaneously write it to a file stream by opening it in binary mode.Though I have not worked on C for over 2 years now... the solution should work.. If u r still unable to solve it, reply back and I will program and post the code here.. But do try it out first..Cheers. Share this post Link to post Share on other sites