equal
deleted
inserted
replaced
103 } |
103 } |
104 } |
104 } |
105 ddict->dictID = MEM_readLE32((const char*)ddict->dictContent + ZSTD_FRAMEIDSIZE); |
105 ddict->dictID = MEM_readLE32((const char*)ddict->dictContent + ZSTD_FRAMEIDSIZE); |
106 |
106 |
107 /* load entropy tables */ |
107 /* load entropy tables */ |
108 CHECK_E( ZSTD_loadDEntropy(&ddict->entropy, |
108 RETURN_ERROR_IF(ZSTD_isError(ZSTD_loadDEntropy( |
109 ddict->dictContent, ddict->dictSize), |
109 &ddict->entropy, ddict->dictContent, ddict->dictSize)), |
110 dictionary_corrupted ); |
110 dictionary_corrupted); |
111 ddict->entropyPresent = 1; |
111 ddict->entropyPresent = 1; |
112 return 0; |
112 return 0; |
113 } |
113 } |
114 |
114 |
115 |
115 |
131 } |
131 } |
132 ddict->dictSize = dictSize; |
132 ddict->dictSize = dictSize; |
133 ddict->entropy.hufTable[0] = (HUF_DTable)((HufLog)*0x1000001); /* cover both little and big endian */ |
133 ddict->entropy.hufTable[0] = (HUF_DTable)((HufLog)*0x1000001); /* cover both little and big endian */ |
134 |
134 |
135 /* parse dictionary content */ |
135 /* parse dictionary content */ |
136 CHECK_F( ZSTD_loadEntropy_intoDDict(ddict, dictContentType) ); |
136 FORWARD_IF_ERROR( ZSTD_loadEntropy_intoDDict(ddict, dictContentType) ); |
137 |
137 |
138 return 0; |
138 return 0; |
139 } |
139 } |
140 |
140 |
141 ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize, |
141 ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize, |