@@ -1162,6 +1162,96 @@ QATZIP_API int qzDecompressExt(QzSession_T *sess, const unsigned char *src,
1162
1162
unsigned int * src_len , unsigned char * dest ,
1163
1163
unsigned int * dest_len , uint64_t * ext_rc );
1164
1164
1165
+ /**
1166
+ *****************************************************************************
1167
+ * @ingroup qatZip
1168
+ * Decompress a buffer and return the CRC checksum
1169
+ *
1170
+ * @description
1171
+ * This function will decompress a buffer if either a hardware based
1172
+ * session or a software based session is available. If no session has been
1173
+ * established - as indicated by the contents of *sess - then this function
1174
+ * will attempt to set up a session using qzInit and qzSetupSession.
1175
+ *
1176
+ * This function will place completed decompression chunks in the output
1177
+ * buffer and put the CRC32 or CRC64 checksum for compressed input data in
1178
+ * the user provided buffer *crc.
1179
+ *
1180
+ * @context
1181
+ * This function shall not be called in an interrupt context.
1182
+ * @assumptions
1183
+ * None
1184
+ * @sideEffects
1185
+ * None
1186
+ * @blocking
1187
+ * Yes
1188
+ * @reentrant
1189
+ * No
1190
+ * @threadSafe
1191
+ * Yes
1192
+ *
1193
+ * @param[in] sess Session handle
1194
+ * (pointer to opaque instance and session data)
1195
+ * @param[in] src Point to source buffer
1196
+ * @param[in] src_len Length of source buffer. Modified to
1197
+ * length of processed compressed data
1198
+ * when function returns
1199
+ * @param[in] dest Point to destination buffer
1200
+ * @param[in,out] dest_len Length of destination buffer. Modified
1201
+ * to length of decompressed data when
1202
+ * function returns
1203
+ * @param[in,out] crc Pointer to CRC32 or CRC64 checksum buffer
1204
+ * @param[in,out] ext_rc qzDecompressCrcExt or qzDecompressCrc64Ext only.
1205
+ * If not NULL, ext_rc point to a location where
1206
+ * extended return codes may be returned. See
1207
+ * extended return code section for details.
1208
+ * if NULL, no extended information will be
1209
+ * provided.
1210
+ *
1211
+ * @retval QZ_OK Function executed successfully
1212
+ * @retval QZ_FAIL Function did not succeed
1213
+ * @retval QZ_PARAMS *sess is NULL or member of params is invalid
1214
+ * @pre
1215
+ * None
1216
+ * @post
1217
+ * None
1218
+ * @note
1219
+ * Only a synchronous version of this function is provided.
1220
+ *
1221
+ * @see
1222
+ * None
1223
+ *
1224
+ *****************************************************************************/
1225
+ QATZIP_API int qzDecompressCrc (QzSession_T * sess ,
1226
+ const unsigned char * src ,
1227
+ unsigned int * src_len ,
1228
+ unsigned char * dest ,
1229
+ unsigned int * dest_len ,
1230
+ unsigned long * crc );
1231
+
1232
+ QATZIP_API int qzDecompressCrcExt (QzSession_T * sess ,
1233
+ const unsigned char * src ,
1234
+ unsigned int * src_len ,
1235
+ unsigned char * dest ,
1236
+ unsigned int * dest_len ,
1237
+ unsigned long * crc ,
1238
+ uint64_t * ext_rc );
1239
+
1240
+ QATZIP_API int qzDecompressCrc64 (QzSession_T * sess ,
1241
+ const unsigned char * src ,
1242
+ unsigned int * src_len ,
1243
+ unsigned char * dest ,
1244
+ unsigned int * dest_len ,
1245
+ uint64_t * crc );
1246
+
1247
+ QATZIP_API int qzDecompressCrc64Ext (QzSession_T * sess ,
1248
+ const unsigned char * src ,
1249
+ unsigned int * src_len ,
1250
+ unsigned char * dest ,
1251
+ unsigned int * dest_len ,
1252
+ uint64_t * crc ,
1253
+ uint64_t * ext_rc );
1254
+
1165
1255
/**
1166
1256
*****************************************************************************
1167
1257
* @ingroup qatZip
0 commit comments