On Tue, May 20, 2003 at 09:24:06AM +0200, Mariusz Wojsyk wrote: > //-- I'm not sure about this: --// > gz.Put(reinterpret_cast<const unsigned char *>(s1.c_str()), > s1.length());
This will work, but it's not as efficient as it could be. data() is preferred to c_str() when you don't need the zero termination, as in this case. You can also use StringStore(s1).TransferTo(gz), which would do the the same thing but looks a bit nicer. > gz.MessageSeriesEnd(); This is not needed for Gzip (although it doesn't hurt either).
