decoding datafile