From: stephan b. <st...@s1...> - 2005-01-01 14:27:51
|
Hi, Christian! i'm looking over the IOD/IOS code, and i would like to port in 2 LGPL classes a couple other guys wrote (don't remember their names) which provide transparent gzip/bzip2 support. Would you mind if i add an optional dependency on zlib/bzip2 to port these classes in? i'm not yet certain how to fit them best into the architecture. They are implemented as i/stream[buffer] implementations and only support files (not, zB, stringstream). There is no FileStream class any longer - only a File device which gets passed to an IOStream. That means i can't extend/modify FileStream. Perhaps a (FileStream : public IOStream) convenience type would be a solution? We could then add member funcs to it like: setCompressionPolicy( None|Gzip|Bzip ); CompressionPolicy getCompressionPolicy() const; For reading files we can auto-determine the decompression technique based on the first few bytes (i don't yet know how to dispatch this type of logic via a factory, though). The problem with this approach is that FileStream would need to proxy all IOS-related API calls to the appropriate de/compressor stream. That's possible to implement, i guess, but tedious. So, i guess my question is: if you were going to add GZip file support, where would you put it? PS: i think the IOS/IOD architecture will easily support the addition of Zip archive support, since we can treat a zip as a virtual filesystem. With s11n support on top of that we've got some really flexible object persistency options. :) -- ----- st...@s1... http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts |