Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Storing Bit Values In A File
kvarnerexpress
post 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.

Go to the top of the page
 
+Quote Post
cse-icons
post 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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How To: Change Your Website's Index File(24)
  2. My File Manager Is Working(2)
  3. Import From Excel File Into Mysql Database(11)
  4. Transfer File Of Any Size Using Winsock Control(5)
  5. My Review Of Megaupload.com(25)
  6. Simple C File Handling In Action(4)
  7. How To Put Music In The Background Of A Powerpoint Presentation(11)
  8. Linux Question: Amarok And File Permissions(4)
  9. How To Open A .daa File(39)
  10. Wmp (windows Media Photo) - The New Image File Format From Microsoft(33)
  11. A Trap17 How-to Guide For Beginners(12)
  12. Read File (.txt) On Another Website Using Jsp?(3)
  13. Need To Shrink The File Size Of Web Image? - Photoshop Tricks(3)
  14. Windows Ntfs Folder And File Compression. Good Or Bad?(6)
  15. Open Any Unknown File Type With Notepad(1)
  1. Question Regarding File Transfer!(4)
  2. Defraggler - Free Software To Defrag Your File(15)
  3. A Good File Explorer For Windows Xp?(6)
  4. Debug Exe Files(4)
  5. Where Is The Bookmarks File Stored With Ff2?(6)
  6. Free Software For File Recovery(6)
  7. Internal File Transfer(5)
  8. File Sharing Hosts!(10)
  9. File Sharing Hosts!(0)
  10. How To Extract The Audio From Youtube Videos(5)
  11. How To Create Pdf Files Using Free Tool(0)
  12. Copy A File And Rename It With Increment If Exist(5)
  13. Linux/ Apache /mod_rewrite Issue(4)


 



- Lo-Fi Version Time is now: 7th October 2008 - 04:34 AM