Exiffer.IO.Buffer (exiffer v0.6.4)

Copy Markdown

Documentation for Exiffer.IO.Buffer.

A buffer with read access to the file source.

When matching on the buffer's raw data, it is up to the user to use ensure/2 so that enough data has been read.

Summary

Functions

close(buffer)

consume(buffer, count)

copy(input, output)

ensure(buffer, amount)

new(filename, opts \\ [])

new_from_binary(binary, opts \\ [])

offset_buffer(buffer, offset)

push(buffer, chunk)

random(buffer, read_position, count)

Read some bytes without changing the current buffer position.

If the bytes are in the current read buffer, simply return them. Otherwise, position the buffer, read the bytes, then reposition the buffer to the previous position.

read_eof(buffer)

Read the remaining bytes

seek(buffer, position)

skip(buffer, count)

tell(buffer)

write(buffer, binary)