libarchive

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

libarchive
Initial release2003; 23 years ago (2003)[1]
Repository
  • {{URL|example.com|optional display text}}Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
Written inC
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    Operating systemcross-platform
    Typelibrary
    LicenseNew BSD License[2]

    libarchive is a free and open-source library for reading and writing various archive and compression formats. It is written in C and works on most Unix-like systems and Windows.[2]

    History

    [edit | edit source]

    libarchive's development was started in 2003 as part of the FreeBSD project.[1] During the early years it was led by the FreeBSD project, but later it became an independent project.[3] It was first released with FreeBSD 5.3 in November 2004.[4]

    libarchive

    [edit | edit source]

    libarchive automatically detects and reads archive formats.[5] If the archive is compressed, libarchive also detects and handles compression formats before evaluating the archive.[5] libarchive is designed to minimize the copying of data internally for optimal performance.[6]

    Supported archive formats:[7]

    • 7z – read and write
    • ar – read and write
    • cab – read only
    • cpio – read and write
    • ISO9660 – read and write
    • lha & lzh – read only
    • pax – read and write
    • rar – read only
    • shar – write only
    • tar – read and write
    • warc (ISO 28500:2009) – read and write
    • xar – read and write
    • zip – read and write

    Utilities

    [edit | edit source]

    libarchive provides command-line utilities called bsdtar and bsdcpio.[2] These are complete re-implementation based on libarchive.[8][9] These are the default system tar and cpio on FreeBSD, NetBSD, macOS and Windows.[4]

    There is also bsdcat, designed to decompress a file to the standard output like zcat.[10]

    Users

    [edit | edit source]

    libarchive was originally developed for FreeBSD, but is also used in NetBSD and macOS as part of those operating systems.[4]

    bsdtar has been included in Windows since Windows 10 April 2018 Update.[11] In May 2023, Microsoft announced Windows 11 will natively support additional archive formats such as 7z and RAR via libarchive.[12]

    References

    [edit | edit source]
    1. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    2. ^ a b c Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    4. ^ a b c Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    5. ^ a b libarchive(3) – FreeBSD Library Functions Manual
    6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    8. ^ bsdtar(1) – FreeBSD General Commands Manual
    9. ^ bsdcpio(1) – FreeBSD General Commands Manual
    10. ^ bsdcat(1) – FreeBSD General Commands Manual
    11. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    12. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    [edit | edit source]
    • Lua error in Module:Official_website at line 94: attempt to index field 'wikibase' (a nil value).