from typing import IO
import io


def read_buffer(filename: str) -> IO:
    """Read content from specified file into a BytesIO buffer.

    Parameters
    ----------
    filename: string
        Path tpo file on disk.

    Returns
    -------
    io.BytesIO
    """
    buf = io.BytesIO()
    with open(filename, 'rb') as f:
        buf.write(f.read())
    buf.seek(0)
    return buf