# MemoTar
You must have gotten truly lost to end up here.
This is an Elixir library for creating tar archives in memory.
## Usage
To create a tar archive in memory:
```elixir
{:ok, binary} = MemoTar.create([{"foo.txt", "Hello World"}])
```
You can also add files one at a time.
However, this also currently requires that directories are added manually:
```elixir
{:ok, tar} = MemoTar.open()
:ok = MemoTar.add_directory(tar, "foo")
:ok = MemoTar.add_file(tar, "foo/bar.txt", "Hello World")
{:ok, binary} = MemoTar.close(tar)
```
## Installation
[Available in Hex](https://hex.pm/packages/memo_tar), the package can be installed
by adding `memo_tar` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:memo_tar, "~> 0.1.0"}
]
end
```
In-depth docs can be found at <https://hexdocs.pm/memo_tar>.