I am making a compression program, and in certain cases the resulting compressed file may not have an exact number of bytes, for example it might end up being 400 bytes and 4 bits. Here's the problem: if the c++ file I/O can only read files that are a mulitiple of 8 bits, these extra 4 bits at the end of the file will really screw up the entire decompression algorithm. Am I going to have to accommodate this, or does c++ do it for me, or really what should I do to prevent this?
P.S I'm sure you'll have noticed, but I'm new to file I/O, so nothing too too complicated please. Thanks!
Thank you very much. btw would you know if certain file systems need to land on, for example, 4 KB boundaries or something? When I format USBs to NTFS, it always asks me for a block size and from what I understand, would I have to pad up to this block size?