close_parent(true)
was specified in
archive_open/4, the
underlying entry stream is closed too. If there is an entry opened with archive_open_entry/2,
actually closing the archive is delayed until the stream associated with
the entry is closed. This can be used to open a stream to an archive
entry without having to worry about closing the archive:
archive_open_named(ArchiveFile, EntryName, Stream) :- archive_open(ArchiveFile, Archive, []), archive_next_header(Archive, EntryName), archive_open_entry(Archive, Stream), archive_close(Archive).