1 /** @defgroup upack_data_file 2 * @{ 3 * 4 * This is an include file of upack js app.bin interface. 5 * 6 * Copyright (C) 2015-2021 Alibaba Group Holding Limited 7 */ 8 #ifndef UPACK_DATA_FILE_H 9 #define UPACK_DATA_FILE_H 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 typedef struct DATA_FILE_PACK_HEAD { 16 unsigned short file_numb; 17 unsigned short pack_ver; 18 unsigned int pack_size; 19 } data_file_pack_head_t; 20 21 typedef struct DATA_FILE_INFO{ 22 unsigned int head_size; 23 unsigned int file_size; 24 char md5_vale[16]; 25 } data_file_infor_t; 26 27 /** 28 * data_file_unpack data file unpack. 29 * 30 * @param[in] void *pack_file pack file name 31 * @param[in] unsigned int pack_size pack file size 32 * @param[in] void *upack_path unpack file store path 33 * 34 * @return 0 upack success. 35 * @return -1 unpack failed. 36 */ 37 int data_file_unpack(void *pack_file, unsigned int pack_size, void *upack_path); 38 /** 39 * @} 40 */ 41 #ifdef __cplusplus 42 } 43 #endif 44 #endif