Basically what I am looking for is a way to get a block memory, copy it into ram in a format along the line of bit[#], replace the original with a new code that may or may not be the same size(they will be something to ensure does not try to save a fraction of a byte).
Is there an easy way to do this or do I just need to read work from a bin file?
If anybody wants to know, this is for school project, and it is just a proof of concept; it does not need to be very optimized.
Accessing a single bit is messy; for instance how does one insert or erase a bit in a sequence of bits?
Perhaps the simplest way is to work with the bits logically, say, a sequence of '0' and '1' chars. These can be easily modified. std::string and std::bitset<> can do the heavy lifting; using them makes our code quite simple.
Thinks for the help, but I think I figured out a way(I will probably use your to test mine). String format is just way to big; if I opened even a 100Kb file in that it would be close a GB of ram.
Here is what I have so far(incomplete and untested)