# `Storehouse.Archive.Format`
[🔗](https://github.com/hattoriai/storehouse/blob/v0.2.0/lib/storehouse/archive/format.ex#L28)

A format of archive (`Storehouse.Archive`): zip (`Storehouse.Archive.Zip`,
the default), tar (`Storehouse.Archive.Tar`), or one of the app's.

    config :storehouse, archive_format: MyApp.SevenZip

`Storehouse.Archive` reads the files, checks their names, decides which
to compress, splits and stores the archive: a format only lays out
bytes. It is given each file as a `Storehouse.Archive.Entry`, and the
options of the call (`:compression`, `:password`, `:modified_at`, its
own).

# `bound`

```elixir
@callback bound(Storehouse.Archive.Entry.t(), opts :: keyword()) :: non_neg_integer()
```

The most bytes a file of known size takes in the archive, its headers
with it: how `:max_bytes` splits.

# `content_type`

```elixir
@callback content_type([Storehouse.Archive.Entry.t()], opts :: keyword()) :: String.t()
```

The archive's content type.

# `end_bound`

```elixir
@callback end_bound(count :: non_neg_integer(), opts :: keyword()) :: non_neg_integer()
```

The most bytes the end of an archive of `count` files takes.

# `size`

```elixir
@callback size([Storehouse.Archive.Entry.t()], opts :: keyword()) ::
  {:ok, non_neg_integer()} | {:about, non_neg_integer()} | :unknown
```

Its size before it is made: `{:ok, bytes}` exact, `{:about, bytes}`
near enough (compressed), or `:unknown` (a file's size is not known).

# `stream`

```elixir
@callback stream([Storehouse.Archive.Entry.t()], opts :: keyword()) :: Enumerable.t()
```

The archive, as a stream of iodata, made as it is taken.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
