GPAK  1.0.0
A general-purpose archive library
Data Structures | Typedefs | Enumerations
gpak_data.h File Reference
#include <stdio.h>
#include <stdint.h>
Include dependency graph for gpak_data.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gpak_header
 
struct  gpak_entry_header
 
struct  gpak
 
struct  gpak_file
 
struct  filesystem_tree_file
 
struct  filesystem_tree_node
 
struct  filesystem_iterator_state
 
struct  filesystem_tree_iterator
 

Typedefs

typedef enum gpak_header_compression_algorithm gpak_header_compression_algorithm_t
 
typedef enum gpak_compression_deflate gpak_compression_deflate_t
 
typedef enum gpak_compression_lz4 gpak_compression_lz4_t
 
typedef enum gpak_compression_zstd gpak_compression_zstd_t
 
typedef struct gpak_header pak_header_t
 
typedef struct gpak_entry_header pak_entry_t
 
typedef enum gpak_error gpak_error_t
 
typedef enum gpak_mode_flag gpak_mode_flag_t
 
typedef enum gpak_stage_flag gpak_stage_flag_t
 
typedef void(* gpak_error_handler_t) (const char *, int32_t, void *)
 
typedef void(* gpak_progress_handler_t) (const char *, size_t, size_t, int32_t, void *)
 
typedef struct gpak gpak_t
 
typedef struct gpak_file gpak_file_t
 
typedef struct filesystem_tree_file filesystem_tree_file_t
 
typedef struct filesystem_tree_node filesystem_tree_node_t
 
typedef struct filesystem_iterator_state filesystem_iterator_state_t
 
typedef struct filesystem_tree_iterator filesystem_tree_iterator_t
 

Enumerations

enum  gpak_header_compression_algorithm { GPAK_HEADER_COMPRESSION_NONE = 0 , GPAK_HEADER_COMPRESSION_DEFLATE = 1 << 0 , GPAK_HEADER_COMPRESSION_ZST = 1 << 1 }
 
enum  gpak_compression_deflate { GPAK_COMPRESSION_DEFLATE_NONE = 0 , GPAK_COMPRESSION_DEFLATE_FAST = 1 , GPAK_COMPRESSION_DEFLATE_BEST = 9 }
 
enum  gpak_compression_lz4 { GPAK_COMPRESSION_LZ4_NONE = 0 , GPAK_COMPRESSION_LZ4_FAST = 3 , GPAK_COMPRESSION_LZ4_MEDIUM = 6 , GPAK_COMPRESSION_LZ4_BEST = 12 }
 
enum  gpak_compression_zstd { GPAK_COMPRESSION_ZST_NONE = 0 , GPAK_COMPRESSION_ZST_FAST = 5 , GPAK_COMPRESSION_ZST_MEDIUM = 10 , GPAK_COMPRESSION_ZST_BEST = 22 }
 
enum  gpak_error {
  GPAK_ERROR_OK = 0 , GPAK_ERROR_ARCHIVE_IS_NULL = -1 , GPAK_ERROR_STREAM_IS_NULL = -2 , GPAK_ERROR_INCORRECT_MODE = -3 ,
  GPAK_ERROR_INCORRECT_HEADER = -4 , GPAK_ERROR_OPEN_FILE = -5 , GPAK_ERROR_WRITE = -6 , GPAK_ERROR_READ = -7 ,
  GPAK_ERROR_FILE_NOT_FOUND = -8 , GPAK_ERROR_DEFLATE_INIT = -9 , GPAK_ERROR_DEFLATE_FAILED = -10 , GPAK_ERROR_INFLATE_INIT = -11 ,
  GPAK_ERROR_INFLATE_FAILED = -12 , GPAK_ERROR_LZ4_WRITE_OPEN = -13 , GPAK_ERROR_LZ4_WRITE = -14 , GPAK_ERROR_LZ4_WRITE_CLOSE = -15 ,
  GPAK_ERROR_LZ4_READ_OPEN = -16 , GPAK_ERROR_LZ4_READ = -17 , GPAK_ERROR_LZ4_READ_CLOSE = -18 , GPAK_ERROR_LZ4_DECOMPRESS = -19 ,
  GPAK_ERROR_EMPTY_INPUT = -20 , GPAK_ERROR_EOF_BEFORE_EOS = -21 , GPAK_ERROR_FILE_CRC_NOT_MATCH = -22 , GPAK_ERROR_INVALID_DICTIONARY = -23 ,
  GPAK_ERROR_FAILED_TO_CREATE_DICTIONARY = -24
}
 
enum  gpak_mode_flag { GPAK_MODE_NONE = 0 , GPAK_MODE_CREATE = 1 << 0 , GPAK_MODE_READ_ONLY = 1 << 1 , GPAK_MODE_UPDATE = 1 << 2 }
 
enum  gpak_stage_flag { GPAK_STAGE_COMPRESSION , GPAK_STAGE_DECOMPRESSION }
 

Detailed Description

Author
AdamFull
Date
23.04.2023
Brief Description:\n The gpak_data.h header file contains all the data structures used by
the Gpak library API for managing game archives.

This header file defines the data structures used to represent the internal organization of a game archive file, including its metadata, file and directory entries, and the internal file system tree. It also includes structures for managing iterators and other utility functions.

These data structures are used throughout the Gpak API to provide users with the ability to create, manipulate, and extract information from game archive files.

To use the Gpak library, simply include this header file along with the main gpak.h header file and link against the Gpak library in your project.

Definition in file gpak_data.h.