我有功能。FA->file_temp 是 FA->file 的副本。FA->file_temp 位于 TEMP 目录中。(C:\Users\User\AppData\Local\Temp)
stat(FA->file, &st_file);
filesize = st_file.st_size;
ffile = fopen(FA->file_temp, "rb");
if (ffile == NULL) perror("NULL!!!!!!!!!!!!!1\n");
strcpy(str, FA->file_dir);
strcat(str, "packed");
temp_name(str) ;
strcpy( FA->tmpname , str);
ftmpname = fopen(FA->tmpname, "wb");
if (ftmpname == NULL) perror("NULL!!!!!!!!!!!!!1\n");
if (rc = encode(ffile, ftmpname, filesize)!=0)
longjmp(Berror, rc);