libsf3
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
sf3_archive.h File Reference
#include "sf3_core.h"
Include dependency graph for sf3_archive.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sf3_archive_meta
 
struct  sf3_file
 A single file from an archive. More...
 
struct  sf3_archive
 

Macros

#define SF3_FORMAT_ID_ARCHIVE   0x01
 The format_id for an archive file.
 

Functions

SF3_INLINE const struct sf3_archive_metasf3_archive_meta_entry (const struct sf3_archive *archive, uint64_t index)
 
SF3_INLINE const char * sf3_archive_meta_mime_type (const struct sf3_archive_meta *meta)
 Returns the C string for the mime-type.
 
SF3_INLINE const char * sf3_archive_meta_path (const struct sf3_archive_meta *meta)
 Returns the C string for the relative file path.
 
SF3_INLINE const struct sf3_filesf3_archive_file (const struct sf3_archive *archive, uint64_t index)
 
SF3_EXPORT size_t sf3_archive_size (const struct sf3_archive *archive)
 Computes the size of the archive file in bytes.
 

Macro Definition Documentation

◆ SF3_FORMAT_ID_ARCHIVE

#define SF3_FORMAT_ID_ARCHIVE   0x01

The format_id for an archive file.

Definition at line 6 of file sf3_archive.h.

Function Documentation

◆ sf3_archive_file()

SF3_INLINE const struct sf3_file * sf3_archive_file ( const struct sf3_archive archive,
uint64_t  index 
)

Retrieves the file entry of the given index.

If the index is larger than the number of files in the archive, null is returned.

Definition at line 70 of file sf3_archive.h.

◆ sf3_archive_meta_entry()

SF3_INLINE const struct sf3_archive_meta * sf3_archive_meta_entry ( const struct sf3_archive archive,
uint64_t  index 
)

Retrieves the metadata entry of the given index.

If the index is larger than the number of files in the archive, null is returned.

Definition at line 49 of file sf3_archive.h.

◆ sf3_archive_meta_mime_type()

SF3_INLINE const char * sf3_archive_meta_mime_type ( const struct sf3_archive_meta meta)

Returns the C string for the mime-type.

Definition at line 57 of file sf3_archive.h.

◆ sf3_archive_meta_path()

SF3_INLINE const char * sf3_archive_meta_path ( const struct sf3_archive_meta meta)

Returns the C string for the relative file path.

Definition at line 62 of file sf3_archive.h.

◆ sf3_archive_size()

SF3_EXPORT size_t sf3_archive_size ( const struct sf3_archive archive)

Computes the size of the archive file in bytes.

Definition at line 80 of file sf3_archive.h.