BAM.Source.Memory (BAM v0.1.0)

Copy Markdown View Source

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.

Summary

Functions

Wraps binary.

Types

t()

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

Functions

open(binary)

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

Wraps binary.