#pragma once #include #include #include /** * Peeks into the provided input stream to determine its compression format, * if any, and returns a corresponding decompressing stream. If the stream is * not compressed, then returns a simple pass-through proxy stream. * * Note that returned stream doesn't own the provided input stream, thus it's * up to the user to free them both. * * @param input Input stream. * @returns Newly constructed stream. */ THolder OpenMaybeCompressedInput(IInputStream* input); /** * Same as `OpenMaybeCompressedInput`, but returned stream owns the one passed * into this function. * * @param input Input stream. * @returns Newly constructed stream. * @see OpenMaybeCompressedInput(IInputStream*) */ THolder OpenOwnedMaybeCompressedInput(THolder input); /** * @param input Input stream. * @returns Newly constructed stream. * @see OpenMaybeCompressedInput(IInputStream*) */ THolder OpenMaybeCompressedInput(const TString& path); THolder OpenMaybeCompressedInput(const TString& path, ui32 bufSize);