From: stephan b. <st...@s1...> - 2005-01-01 19:52:59
|
On Saturday 01 January 2005 18:21, Christian Prochnow wrote: > > 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). > > this could be transparently done by IODevice::read(). But IODevice > must then know all IOFilter's. If we could come up with a factory-like approach which works for all existing compression formats i think we could do it generically. e.g., grab the first 6 bytes of any stream and pass them to to Factory<IOStream>::create(). If it can load a factory with that cookie, great. That means using binary strings as cookies, but this doesn't inherently pose a problem for std::string keys. -- ----- st...@s1... http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts |