Skip to content
FutureBlitz

    Install

    Import std.compress.seven_zip

    std.compress.seven_zip

    7z's archives, read over liblzma: SevenZip.Read gives a SevenZipReader of a 7z's entries. Its folders' coders can be stored, LZMA, LZMA2, Delta, and the branch filters for x86, PowerPC, IA-64, ARM, ARM Thumb, ARM64, SPARC, and RISC-V, in a chain, as 7-Zip writes them by default. Others, like BCJ2, PPMd, BZip2, and AES's encryption, read as an IOError. A solid folder is decoded whole, once for the files read from it in turn. Writing 7z isn't std's.

    std/compress/seven_zip.fb

    Types

    SevenZip struct

    Public Struct SevenZip

    What reads 7z archives, in its Static Methods.

    std/compress/seven_zip.fb, line 26

    • Public Static Method Read(data: UInt8[]): SevenZipReader Throws IOError static method #

      A reader of the 7z in data, which it copies, or an IOError when the data isn't a 7z, ends too soon, or its header uses what isn't supported.

    SevenZipReader class

    Public Class SevenZipReader

    A 7z's entries, which Read gives the bytes of, from a copy of the 7z's bytes.

    std/compress/seven_zip.fb, line 37

    • Public Property Entries: ReadOnlyArray<ArchiveEntry> property #

      Its entries, in the order the 7z has them.

    • Public Property Count: Int property #

      How many entries it has.

    • Public Method Find(name: String): ArchiveEntry? method #

      The entry named name, the last of them when there are several, or Null when there's none.

    • Public Method Contains(name: String): Bool method #

      Whether it has an entry named name.

    • Public Method Read(name: String): UInt8[]? Throws IOError method #

      The bytes of the entry named name, the last of them when there are several, or Null when there's none, as ReadAt gives them.

    • @PanicsAtCaller Public Method ReadAt(index: Int): UInt8[] Throws IOError method #

      The bytes of the entry at index, which are none for a folder or a link, or an IOError when they're broken, or use a coder that isn't supported. Panics when the index is out of range.

    Report an issue with this page or with FutureBlitz on GitHub.