- archive_data_stream(+Archive, -DataStream, +Options) is nondet
- True when DataStream is a stream to a data object inside
Archive. This predicate transparently unpacks data inside
possibly nested archives, e.g., a tar file inside a zip
file. It applies the appropriate decompression filters and thus
ensures that Prolog reads the plain data from DataStream.
DataStream must be closed after the content has been processed.
Backtracking opens the next member of the (nested) archive. This
predicate processes the following options:
- meta_data(-Data:list(dict))
- If provided, Data is unified with a list of filters applied to
the (nested) archive to open the current DataStream. The first
element describes the outermost archive. Each Data dict
contains the header properties (archive_header_property/2) as
well as the keys:
- filters(Filters:list(atom))
- Filter list as obtained from archive_property/2
- name(Atom)
- Name of the entry.
Non-archive files are handled as pseudo-archives that hold a single stream. This is implemented by using archive_open/3 with the options
[format(all),format(raw)]
.