Document decode function.