scopedOpenArchive

fnScopedArchiveReader scopedOpenArchive(string path, ReadOptions opts = ReadOptions.init)

Open archive with automatic cleanup.

Returns a ScopedArchiveReader that automatically closes the reader when it goes out of scope.

Parameters

pathPath to the archive file.
optsRead options including format and password.

Returns

A ScopedArchiveReader wrapping the opened archive.

Throws

ArchiveError if the file cannot be read or format is unknown.
fnScopedArchiveReader scopedOpenArchive(const(ubyte)[] data, ReadOptions opts = ReadOptions.init)

Open archive from data with automatic cleanup.

Parameters

dataThe archive data as a byte slice.
optsRead options including format and password.

Returns

A ScopedArchiveReader wrapping the opened archive.