# `ExStorageServiceSdk.ByteSource`
[🔗](https://github.com/gsmlg-opt/ex_storage_service/blob/v0.7.1/lib/ex_storage_service_sdk/byte_source.ex#L1)

A replayable, bounded byte source that can be folded more than once.

Request checksums pass `checksum_source:` values through this protocol so a body
can be hashed before it is streamed, without materializing it in memory.

# `t`

```elixir
@type t() :: term()
```

All the types that implement this protocol.

# `reduce`

```elixir
@spec reduce(t(), acc, (binary(), acc -&gt; acc), keyword()) ::
  {:ok, acc} | {:error, ExStorageServiceSdk.Error.t()}
when acc: term()
```

Folds the source's chunks in order. `opts` may carry `:coordinator`, the
request's `ExStorageServiceSdk.Transfer.Coordinator`, for cancellation.

---

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