Kshitij Mittal
Kshitij Mittal

Reputation: 2776

How to uncompress .7z files in elixir/erlang

I am working on a problem which requires my system to uncompress .7z files in elixir/erlang.

Is there any such library that can uncompress .7z file in erlang or elixir? Or any method to do the same?

TIA :)

Upvotes: 3

Views: 476

Answers (2)

Onorio Catenacci
Onorio Catenacci

Reputation: 15343

You might also want to check out this Erlang module as well. http://erlang.org/doc/man/zip.html

Upvotes: 1

A. Sarid
A. Sarid

Reputation: 3996

I guess that the best and simplest way for doing it is by running the right system command to uncompress the file.
You can do this using os:cmd/1:

In case you just want to uncompress to the working directory, just run this command:

os:cmd("7za x File.7z").

For more information about how to use 7z in command line see this or this.

Note: You just need to make sure you have the right 7z utility according to your OS.

Upvotes: 4

Related Questions