# `BAM.Source.Memory`
[🔗](https://github.com/baoulo/bam-elixir/blob/v0.1.0/lib/bam/source/memory.ex#L1)

In-memory byte source.

The binary is the whole input. `pread/3` slices it. Closing drops the
reference held by this struct so the caller can release a large binary
before the process ends.

# `t`

```elixir
@type t() :: %BAM.Source.Memory{
  closed: boolean(),
  data: binary(),
  size: non_neg_integer()
}
```

# `open`

```elixir
@spec open(binary()) :: {:ok, t()}
```

Wraps `binary`.

---

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