code and decode wsq files