Boost logo

Boost :

Subject: [boost] reducing file size after I am done with an mmap
From: Clark Sims (clark_sims_boost_at_[hidden])
Date: 2010-12-17 19:12:47

Is there some way to downsize a file? 

 More specifically, if I open a filebuff:

 f(  "foo.txt",std::ios_base::in|std::ios_base::out|std::ios_base::trunc|std::ios_base::binary);

then space  forward, write a character, f.pubseekoff( 10000, std::ios_base::beg);   write a character, f.sputc(0); f.pubsync(); Is there someway for me to "unwrite the character", and reduce the file size?    I am in a situation where I am allocating big files for mmap's, and then when I am done, I have a lot of unused space which I would like to release.

Boost list run by bdawes at, gregod at, cpdaniel at, john at