def _parse_standard_flag(read_buffer, mask_length):
<EOL>mask_format = {<NUM_LIT:1>: '<STR_LIT:B>', <NUM_LIT:2>: '<STR_LIT:H>', <NUM_LIT:4>: '<STR_LIT:I>'}[mask_length]<EOL>num_standard_flags, = struct.unpack_from('<STR_LIT>', read_buffer, offset=<NUM_LIT:0>)<EOL>fmt = '<STR_LIT:>>' + ('<STR_LIT:H>' + mask_format) * num_standard_flags<EOL>data = struct.unpack_from(fmt, read_buffer, offset=<NUM_LIT:2>)<EOL>standard_flag = data[<NUM_LIT:0>:num_standard_flags * <NUM_LIT:2>:<NUM_LIT:2>]<EOL>standard_mask = data[<NUM_LIT:1>:num_standard_flags * <NUM_LIT:2>:<NUM_LIT:2>]<EOL>return standard_flag, standard_mask<EOL>
Construct standard flag, standard mask data from the file.

    Specifically working on Reader Requirements box.

    Parameters
    ----------
    fptr : file object
        File object for JP2K file.
    mask_length : int
        Length of standard mask flag