create new functions of the struct_def.h and file_encode