View Single Post
Old 10-14-2004, 07:19 PM   #1 (permalink)
john_tran
Registered User
 
Join Date: Oct 2004
Posts: 22
john_tran is on a distinguished road
need your help about writing data to file

I've read the LZW compression algorithm. And i know i must use 12 bit number to code the string.
But i dont know how to write this code 12 bit to file. But C++ just accepts bytes. How can i do that with bit. Someone tell me do this :
write 16bit (2 bytes) , certainly remaining 4 bit from the next code. And add the next 16 bit to file, surely contains 8 bit from the next code, and so one. I think it is right, isn it?
But how i can do that?
Please suggesting me all the technologies i have to learn for this purpose.
Or give me the link to page that contain this topic or tutorial.
Thanks
john_tran is offline   Reply With Quote