validate formats, decode data for zip format