|
|
|
|
![]() ![]() |
Jul 13 2005, 03:22 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 407 Joined: 13-December 04 Member No.: 2,696 |
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. |
|
|
|
Jul 14 2005, 06:02 AM
Post
#2
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 351 Joined: 19-October 04 From: India Member No.: 1,824 |
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. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 7th October 2008 - 04:34 AM |