Well, I've never used code folding, but I like the idea
What happens if you edit the file in a normal text-editor and open it again in C::B?
No problem, just save the file size or a file checksum with the fold states. If the file was modified outside cb, reset the fold states.
If you fix that issue, you still have an issue with size of the project file for all the files used within your workspace... each line's fold state have to be remembered...
This probably won't be much data.
Maybe:
filename
hash or size
line
line
line
...
where line is the absolute line number, which is folded.
I think this would help developers to get along with the source, if they are continuing work, a little bit