add E_ABORT detection

- lz4 and lz5 are not finished...
This commit is contained in:
Tino Reichardt
2016-11-20 16:42:13 +01:00
parent 94b2bf5dec
commit 4c28e3fa11
12 changed files with 188 additions and 97 deletions

View File

@@ -48,6 +48,7 @@ typedef enum {
ZSTDMT_error_frame_decompress,
ZSTDMT_error_compressionParameter_unsupported,
ZSTDMT_error_compression_library,
ZSTDMT_error_canceled,
ZSTDMT_error_maxCode
} ZSTDMT_ErrorCode;
@@ -73,6 +74,12 @@ typedef struct {
* - you can use stdio functions or plain read/write
* - just write some wrapper on your own
* - a sample is given in 7-Zip ZS
*
* error definitions:
* 0 = success
* -1 = generic read/write error
* -2 = user abort
* -3 = memory
*/
typedef int (fn_read) (void *args, ZSTDMT_Buffer * in);
typedef int (fn_write) (void *args, ZSTDMT_Buffer * out);