def stream_create_default_file_stream(fname, isa_read_stream):
ARGTYPES = [ctypes.c_char_p, ctypes.c_int32]<EOL>OPENJP2.opj_stream_create_default_file_stream.argtypes = ARGTYPES<EOL>OPENJP2.opj_stream_create_default_file_stream.restype = STREAM_TYPE_P<EOL>read_stream = <NUM_LIT:1> if isa_read_stream else <NUM_LIT:0><EOL>file_argument = ctypes.c_char_p(fname.encode())<EOL>stream = OPENJP2.opj_stream_create_default_file_stream(file_argument,<EOL>read_stream)<EOL>return stream<EOL>
Wraps openjp2 library function opj_stream_create_default_vile_stream.

    Sets the stream to be a file stream.  This function is only valid for the
    2.1 version of the openjp2 library.

    Parameters
    ----------
    fname : str
        Specifies a file.
    isa_read_stream:  bool
        True (read) or False (write)

    Returns
    -------
    stream : stream_t
        An OpenJPEG file stream.