def _parse_vendor_features(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_vendor_features, = struct.unpack_from('<STR_LIT>', read_buffer)<EOL>entry_length = <NUM_LIT:16> + mask_length<EOL>vendor_feature = []<EOL>vendor_mask = []<EOL>for j in range(num_vendor_features):<EOL><INDENT>uslice = slice(<NUM_LIT:2> + j * entry_length, <NUM_LIT:2> + (j + <NUM_LIT:1>) * entry_length)<EOL>ubuffer = read_buffer[uslice]<EOL>vendor_feature.append(UUID(bytes=ubuffer[<NUM_LIT:0>:<NUM_LIT:16>]))<EOL>vmask = struct.unpack('<STR_LIT:>>' + mask_format, ubuffer[<NUM_LIT:16>:])<EOL>vendor_mask.append(vmask)<EOL><DEDENT>return vendor_feature, vendor_mask<EOL>
Construct vendor features, vendor 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 vendor mask flag