I create a pipe using fopencookie to open file by FILE handle inside gz, how would I need to cleanup? Do I need to close something but resulting handle?
For example there's a bz inside gz:
int do_close(void* f){
return ::gzclose( reinterpret_cast<gzFile>(f)) ;
}
void main()
{
cookie_io_functions_t func = {
NULL,
NULL,
NULL,
do_close
};
gzFile gzf = ::gzopen("test.gz", "r");
FILE* fp = fopencookie(gzf , "r", func);
BZFILE *bzf = BZ2_bzopen(fp , "r");
BZ2_bzclose(bzf);
//Do I need to close something but this?
//If this is not the end of program but is the end of file usage?
}