loca table fixes and added RLE encoding

it is not should rename flag_mtx to just flag