Solve the content encoding problem

change the output algorithm