Niotso  git revision 558726a9f13d7c3423a683dd2f4323589b66c310
The New Implementation of The Sims Online
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Typedefs | Functions | Variables
far.h File Reference

Go to the source code of this file.

Classes

struct  PersistFile_s
 
struct  RefPackParameters_s
 
struct  FAREntry_s
 
struct  FAREntryNode_s
 
struct  FARFile_s
 

Macros

#define FAR_CONFIG_DEFAULT_TO_1A   0
 
#define FAR_CONFIG_DBPF_COMPRESSED   1
 
#define FAR_CONFIG_MAX_FILE_NAME_LENGTH   2
 
#define FAR_CONFIG_REFPACK_HNSV   3
 
#define FAR_TYPE_INVALID   0
 
#define FAR_TYPE_FAR   1
 
#define FAR_TYPE_DBPF   2
 
#define FAR_TYPE_PERSIST   3
 
#define FAR_ARCHIVE_MINIMUM_SIZE   14
 
#define MINSIZE_FAR   20
 
#define MINSIZE_DBPF   64
 
#define MINSIZE_ENTRY_FAR_1A   16
 
#define MINSIZE_ENTRY_FAR_1B   14
 
#define MINSIZE_ENTRY_FAR_3   24
 
#define SIZEOF_ENTRY_DBPF   20
 
#define MAX_ENTRIES_FAR_1A   268435455
 
#define MAX_ENTRIES_FAR_1B   306783377
 
#define MAX_ENTRIES_FAR_3   178956970
 
#define MAX_ENTRIES_DBPF   214748364
 
#define MINSIZE_PERSIST   18
 
#define MAXSIZE_REFPACK_UNCOMPRESSED   16777215
 
#define MAXSIZE_REFPACK_COMPRESSED   16777215
 

Typedefs

typedef struct PersistFile_s PersistFile
 
typedef struct RefPackParameters_s RefPackParameters
 
typedef struct FAREntry_s FAREntry
 
typedef struct FAREntryNode_s FAREntryNode
 
typedef struct FARFile_s FARFile
 

Functions

void libfar_set_option (int Option, int Value)
 
int libfar_get_option (int Option)
 
int far_identify (const uint8_t *Buffer, unsigned FileSize)
 
FARFilefar_create_archive (int Type)
 
PersistFilefar_create_persist ()
 
FAREntryNodefar_add_entry (FARFile *FARFileInfo, int Position)
 
int far_read_header (FARFile *FARFileInfo, const uint8_t *Buffer, unsigned FileSize)
 
int far_read_entry (const FARFile *FARFileInfo, FAREntry *FAREntryInfo, const uint8_t *Buffer, unsigned MaxEntrySize, unsigned ArchiveSize)
 
int far_read_persist_header (PersistFile *PersistData, const uint8_t *Buffer, unsigned FileSize)
 
int far_read_entry_data (const FARFile *FARFileInfo, FAREntry *FAREntryInfo, uint8_t *Buffer)
 
int far_read_persist_data (PersistFile *PersistData, uint8_t *CompressedData)
 
int far_enumerate_entries (FARFile *FARFileInfo, const uint8_t *Index, unsigned IndexSize, unsigned ArchiveSize)
 
int far_enumerate_entry_data (const FARFile *FARFileInfo, uint8_t *Buffer)
 
FAREntryNodefar_search_id ()
 
FAREntryNodefar_search_name ()
 
FAREntryNodefar_search_multi ()
 
void far_delete_entry (FARFile *FARFileInfo, int Position)
 
void far_delete_archive (FARFile *FARFileInfo)
 
void far_delete_persist (FARFile *FARFileInfo)
 
void libfar_free (void *ptr)
 
int RefPackDecompress (const uint8_t *CompressedData, size_t CompressedSize, uint8_t *DecompressedData, size_t DecompressedSize, unsigned HNSV)
 

Variables

static const uint8_t Header_FAR [] = {'F','A','R','!','b','y','A','Z'}
 
static const uint8_t Header_DBPF [] = {'D','B','P','F'}
 

Macro Definition Documentation

#define FAR_ARCHIVE_MINIMUM_SIZE   14
#define FAR_CONFIG_DBPF_COMPRESSED   1
#define FAR_CONFIG_DEFAULT_TO_1A   0
#define FAR_CONFIG_MAX_FILE_NAME_LENGTH   2
#define FAR_CONFIG_REFPACK_HNSV   3
#define FAR_TYPE_DBPF   2
#define FAR_TYPE_FAR   1
#define FAR_TYPE_INVALID   0
#define FAR_TYPE_PERSIST   3
#define MAX_ENTRIES_DBPF   214748364
#define MAX_ENTRIES_FAR_1A   268435455
#define MAX_ENTRIES_FAR_1B   306783377
#define MAX_ENTRIES_FAR_3   178956970
#define MAXSIZE_REFPACK_COMPRESSED   16777215
#define MAXSIZE_REFPACK_UNCOMPRESSED   16777215
#define MINSIZE_DBPF   64
#define MINSIZE_ENTRY_FAR_1A   16
#define MINSIZE_ENTRY_FAR_1B   14
#define MINSIZE_ENTRY_FAR_3   24
#define MINSIZE_FAR   20
#define MINSIZE_PERSIST   18
#define SIZEOF_ENTRY_DBPF   20

Typedef Documentation

typedef struct FAREntry_s FAREntry
typedef struct FAREntryNode_s FAREntryNode
typedef struct FARFile_s FARFile
typedef struct PersistFile_s PersistFile

Function Documentation

FAREntryNode* far_add_entry ( FARFile FARFileInfo,
int  Position 
)
FARFile* far_create_archive ( int  Type)
PersistFile* far_create_persist ( )
void far_delete_archive ( FARFile FARFileInfo)
void far_delete_entry ( FARFile FARFileInfo,
int  Position 
)
void far_delete_persist ( FARFile FARFileInfo)
int far_enumerate_entries ( FARFile FARFileInfo,
const uint8_t *  Index,
unsigned  IndexSize,
unsigned  ArchiveSize 
)
int far_enumerate_entry_data ( const FARFile FARFileInfo,
uint8_t *  Buffer 
)
int far_identify ( const uint8_t *  Buffer,
unsigned  FileSize 
)
int far_read_entry ( const FARFile FARFileInfo,
FAREntry FAREntryInfo,
const uint8_t *  Buffer,
unsigned  MaxEntrySize,
unsigned  ArchiveSize 
)
int far_read_entry_data ( const FARFile FARFileInfo,
FAREntry FAREntryInfo,
uint8_t *  Buffer 
)
int far_read_header ( FARFile FARFileInfo,
const uint8_t *  Buffer,
unsigned  FileSize 
)
int far_read_persist_data ( PersistFile PersistData,
uint8_t *  CompressedData 
)
int far_read_persist_header ( PersistFile PersistData,
const uint8_t *  Buffer,
unsigned  FileSize 
)
FAREntryNode* far_search_id ( )
FAREntryNode* far_search_multi ( )
FAREntryNode* far_search_name ( )
void libfar_free ( void *  ptr)
int libfar_get_option ( int  Option)
void libfar_set_option ( int  Option,
int  Value 
)
int RefPackDecompress ( const uint8_t *  CompressedData,
size_t  CompressedSize,
uint8_t *  DecompressedData,
size_t  DecompressedSize,
unsigned  HNSV 
)

Variable Documentation

const uint8_t Header_DBPF[] = {'D','B','P','F'}
static
const uint8_t Header_FAR[] = {'F','A','R','!','b','y','A','Z'}
static