File indexing completed on 2025-01-17 09:56:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ZSTD_ERRORS_H_398273423
0012 #define ZSTD_ERRORS_H_398273423
0013
0014 #if defined (__cplusplus)
0015 extern "C" {
0016 #endif
0017
0018
0019 #include <stddef.h> /* size_t */
0020
0021
0022
0023 #ifndef ZSTDERRORLIB_VISIBLE
0024
0025 # ifdef ZSTDERRORLIB_VISIBILITY
0026 # define ZSTDERRORLIB_VISIBLE ZSTDERRORLIB_VISIBILITY
0027 # elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
0028 # define ZSTDERRORLIB_VISIBLE __attribute__ ((visibility ("default")))
0029 # else
0030 # define ZSTDERRORLIB_VISIBLE
0031 # endif
0032 #endif
0033
0034 #ifndef ZSTDERRORLIB_HIDDEN
0035 # if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
0036 # define ZSTDERRORLIB_HIDDEN __attribute__ ((visibility ("hidden")))
0037 # else
0038 # define ZSTDERRORLIB_HIDDEN
0039 # endif
0040 #endif
0041
0042 #if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
0043 # define ZSTDERRORLIB_API __declspec(dllexport) ZSTDERRORLIB_VISIBLE
0044 #elif defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)
0045 # define ZSTDERRORLIB_API __declspec(dllimport) ZSTDERRORLIB_VISIBLE
0046 #else
0047 # define ZSTDERRORLIB_API ZSTDERRORLIB_VISIBLE
0048 #endif
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064 typedef enum {
0065 ZSTD_error_no_error = 0,
0066 ZSTD_error_GENERIC = 1,
0067 ZSTD_error_prefix_unknown = 10,
0068 ZSTD_error_version_unsupported = 12,
0069 ZSTD_error_frameParameter_unsupported = 14,
0070 ZSTD_error_frameParameter_windowTooLarge = 16,
0071 ZSTD_error_corruption_detected = 20,
0072 ZSTD_error_checksum_wrong = 22,
0073 ZSTD_error_literals_headerWrong = 24,
0074 ZSTD_error_dictionary_corrupted = 30,
0075 ZSTD_error_dictionary_wrong = 32,
0076 ZSTD_error_dictionaryCreation_failed = 34,
0077 ZSTD_error_parameter_unsupported = 40,
0078 ZSTD_error_parameter_combination_unsupported = 41,
0079 ZSTD_error_parameter_outOfBound = 42,
0080 ZSTD_error_tableLog_tooLarge = 44,
0081 ZSTD_error_maxSymbolValue_tooLarge = 46,
0082 ZSTD_error_maxSymbolValue_tooSmall = 48,
0083 ZSTD_error_stabilityCondition_notRespected = 50,
0084 ZSTD_error_stage_wrong = 60,
0085 ZSTD_error_init_missing = 62,
0086 ZSTD_error_memory_allocation = 64,
0087 ZSTD_error_workSpace_tooSmall= 66,
0088 ZSTD_error_dstSize_tooSmall = 70,
0089 ZSTD_error_srcSize_wrong = 72,
0090 ZSTD_error_dstBuffer_null = 74,
0091 ZSTD_error_noForwardProgress_destFull = 80,
0092 ZSTD_error_noForwardProgress_inputEmpty = 82,
0093
0094 ZSTD_error_frameIndex_tooLarge = 100,
0095 ZSTD_error_seekableIO = 102,
0096 ZSTD_error_dstBuffer_wrong = 104,
0097 ZSTD_error_srcBuffer_wrong = 105,
0098 ZSTD_error_sequenceProducer_failed = 106,
0099 ZSTD_error_externalSequences_invalid = 107,
0100 ZSTD_error_maxCode = 120
0101 } ZSTD_ErrorCode;
0102
0103
0104
0105
0106 ZSTDERRORLIB_API ZSTD_ErrorCode ZSTD_getErrorCode(size_t functionResult);
0107 ZSTDERRORLIB_API const char* ZSTD_getErrorString(ZSTD_ErrorCode code);
0108
0109
0110 #if defined (__cplusplus)
0111 }
0112 #endif
0113
0114 #endif