GPAK  1.0.0
A general-purpose archive library

◆ gpak_error

enum gpak_error
Brief Description:\n Enumeration representing the error codes for G-PAK operations.

This enumeration contains values representing the different error codes that can be encountered during G-PAK operations, such as issues with archive or stream handling, mode errors, and compression/decompression errors.

Enumerator
GPAK_ERROR_OK 

No error occurred.

GPAK_ERROR_ARCHIVE_IS_NULL 

The archive pointer is NULL.

GPAK_ERROR_STREAM_IS_NULL 

The stream pointer is NULL.

GPAK_ERROR_INCORRECT_MODE 

The mode flag is incorrect.

GPAK_ERROR_INCORRECT_HEADER 

The archive header is incorrect.

GPAK_ERROR_OPEN_FILE 

An error occurred while opening a file.

GPAK_ERROR_WRITE 

An error occurred while writing to a file.

GPAK_ERROR_READ 

An error occurred while reading from a file.

GPAK_ERROR_FILE_NOT_FOUND 

The specified file was not found.

GPAK_ERROR_DEFLATE_INIT 

An error occurred while initializing deflate.

GPAK_ERROR_DEFLATE_FAILED 

Deflate operation failed.

GPAK_ERROR_INFLATE_INIT 

An error occurred while initializing inflate.

GPAK_ERROR_INFLATE_FAILED 

Inflate operation failed.

GPAK_ERROR_LZ4_WRITE_OPEN 

An error occurred while opening an LZ4 file for writing.

GPAK_ERROR_LZ4_WRITE 

An error occurred while writing to an LZ4 file.

GPAK_ERROR_LZ4_WRITE_CLOSE 

An error occurred while closing an LZ4 file after writing.

GPAK_ERROR_LZ4_READ_OPEN 

An error occurred while opening an LZ4 file for reading.

GPAK_ERROR_LZ4_READ 

An error occurred while reading from an LZ4 file.

GPAK_ERROR_LZ4_READ_CLOSE 

An error occurred while closing an LZ4 file after reading.

GPAK_ERROR_LZ4_DECOMPRESS 

An error occurred during LZ4 decompression.

GPAK_ERROR_EMPTY_INPUT 

The input is empty.

GPAK_ERROR_EOF_BEFORE_EOS 

End of file encountered before end of stream.

GPAK_ERROR_FILE_CRC_NOT_MATCH 

The file CRC does not match.

GPAK_ERROR_INVALID_DICTIONARY 

The dictionary is invalid.

GPAK_ERROR_FAILED_TO_CREATE_DICTIONARY 

Failed to create a dictionary.

Definition at line 153 of file gpak_data.h.

154 {
155  GPAK_ERROR_OK = 0, /**< No error occurred. */
156  GPAK_ERROR_ARCHIVE_IS_NULL = -1, /**< The archive pointer is NULL. */
157  GPAK_ERROR_STREAM_IS_NULL = -2, /**< The stream pointer is NULL. */
158  GPAK_ERROR_INCORRECT_MODE = -3, /**< The mode flag is incorrect. */
159  GPAK_ERROR_INCORRECT_HEADER = -4, /**< The archive header is incorrect. */
160  GPAK_ERROR_OPEN_FILE = -5, /**< An error occurred while opening a file. */
161  GPAK_ERROR_WRITE = -6, /**< An error occurred while writing to a file. */
162  GPAK_ERROR_READ = -7, /**< An error occurred while reading from a file. */
163  GPAK_ERROR_FILE_NOT_FOUND = -8, /**< The specified file was not found. */
164 
165  // Deflate
166  GPAK_ERROR_DEFLATE_INIT = -9, /**< An error occurred while initializing deflate. */
167  GPAK_ERROR_DEFLATE_FAILED = -10, /**< Deflate operation failed. */
168  GPAK_ERROR_INFLATE_INIT = -11, /**< An error occurred while initializing inflate. */
169  GPAK_ERROR_INFLATE_FAILED = -12, /**< Inflate operation failed. */
170 
171  // LZ4 errors
172  GPAK_ERROR_LZ4_WRITE_OPEN = -13, /**< An error occurred while opening an LZ4 file for writing. */
173  GPAK_ERROR_LZ4_WRITE = -14, /**< An error occurred while writing to an LZ4 file. */
174  GPAK_ERROR_LZ4_WRITE_CLOSE = -15, /**< An error occurred while closing an LZ4 file after writing. */
175  GPAK_ERROR_LZ4_READ_OPEN = -16, /**< An error occurred while opening an LZ4 file for reading. */
176  GPAK_ERROR_LZ4_READ = -17, /**< An error occurred while reading from an LZ4 file. */
177  GPAK_ERROR_LZ4_READ_CLOSE = -18, /**< An error occurred while closing an LZ4 file after reading. */
178  GPAK_ERROR_LZ4_DECOMPRESS = -19, /**< An error occurred during LZ4 decompression. */
179 
180  // ZSTD
181  GPAK_ERROR_EMPTY_INPUT = -20, /**< The input is empty. */
182  GPAK_ERROR_EOF_BEFORE_EOS = -21, /**< End of file encountered before end of stream. */
183 
184  //crc
185  GPAK_ERROR_FILE_CRC_NOT_MATCH = -22, /**< The file CRC does not match. */
186 
187  // dictionary
188  GPAK_ERROR_INVALID_DICTIONARY = -23, /**< The dictionary is invalid. */
189  GPAK_ERROR_FAILED_TO_CREATE_DICTIONARY = -24 /**< Failed to create a dictionary. */
190 };
@ GPAK_ERROR_INFLATE_FAILED
Definition: gpak_data.h:169
@ GPAK_ERROR_INVALID_DICTIONARY
Definition: gpak_data.h:188
@ GPAK_ERROR_LZ4_DECOMPRESS
Definition: gpak_data.h:178
@ GPAK_ERROR_INFLATE_INIT
Definition: gpak_data.h:168
@ GPAK_ERROR_FAILED_TO_CREATE_DICTIONARY
Definition: gpak_data.h:189
@ GPAK_ERROR_WRITE
Definition: gpak_data.h:161
@ GPAK_ERROR_INCORRECT_MODE
Definition: gpak_data.h:158
@ GPAK_ERROR_STREAM_IS_NULL
Definition: gpak_data.h:157
@ GPAK_ERROR_LZ4_READ_CLOSE
Definition: gpak_data.h:177
@ GPAK_ERROR_EMPTY_INPUT
Definition: gpak_data.h:181
@ GPAK_ERROR_LZ4_WRITE_CLOSE
Definition: gpak_data.h:174
@ GPAK_ERROR_ARCHIVE_IS_NULL
Definition: gpak_data.h:156
@ GPAK_ERROR_READ
Definition: gpak_data.h:162
@ GPAK_ERROR_OPEN_FILE
Definition: gpak_data.h:160
@ GPAK_ERROR_DEFLATE_FAILED
Definition: gpak_data.h:167
@ GPAK_ERROR_LZ4_WRITE_OPEN
Definition: gpak_data.h:172
@ GPAK_ERROR_DEFLATE_INIT
Definition: gpak_data.h:166
@ GPAK_ERROR_EOF_BEFORE_EOS
Definition: gpak_data.h:182
@ GPAK_ERROR_LZ4_READ_OPEN
Definition: gpak_data.h:175
@ GPAK_ERROR_LZ4_WRITE
Definition: gpak_data.h:173
@ GPAK_ERROR_FILE_NOT_FOUND
Definition: gpak_data.h:163
@ GPAK_ERROR_OK
Definition: gpak_data.h:155
@ GPAK_ERROR_INCORRECT_HEADER
Definition: gpak_data.h:159
@ GPAK_ERROR_FILE_CRC_NOT_MATCH
Definition: gpak_data.h:185
@ GPAK_ERROR_LZ4_READ
Definition: gpak_data.h:176