how to read & write bits on a file in C
hi,
i am making a compression program using huffman algo,for which i have to read and write on the file in the form of bits. stdio.h does not provide functions for reading and writing bits to a file. if any one knows the solution please reply(please explain in detail). also if someone knows a good site regarding huffman compression do refer it.
You cannot read or write to a file using bits for units. You must round up to bytes or something that can be composed of bytes (you can access the individual bits of a byte relatively easily using bitwise masking and shifting).
Cross-posts are evil!
/*=========================================*/
/* Chem0sh */
/* Lead Software Engineer & Tech Support */
/* http://www.eFaces.biz */
/*=========================================*/
/*=========================================*/
/* Chem0sh */
/* Lead Software Engineer & Tech Support */
/* http://www.eFaces.biz */
/*=========================================*/
/*=========================================// Chem0sh// Lead Software Engineer & Tech Support// http://www.eFaces.biz=========================================*/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement