Skip to content
7z extraction for Nim
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Nim7z is a Nim wrapper for the 7zip decoder.

Nim7z is distributed as a Nimble package and depends on nimgen and c2nim to generate the wrappers. The 7zip source code is downloaded using Git so having git in the path is required.


Nim7z can be installed via Nimble:

> nimble install nim7z

This will download, wrap and install nim7z in the standard Nimble package location, typically ~/.nimble. Once installed, it can be imported into any Nim program.


Module documentation can be found here.

import nim7z

let svnz = new7zFile("testfile.7z")
extract(svnz, "outdir")

extract("testfile.7z", "outdir", skipOuterDirs=true)

Refer to the tests directory for examples on how the library can be used.


Nim7z wraps the 7zip source code and all licensing terms of 7zip apply to the usage of this package.

Credits go out to c2nim as well without which this package would be greatly limited in its abilities.


Nim7z is a work in progress and any feedback or suggestions are welcome. It is hosted on GitHub with an MIT license so issues, forks and PRs are most appreciated.

You can’t perform that action at this time.