Public Methods | |
void | Archive_ctor (struct Archive *ptr_archive, char *sz_archive_name) |
void | Archive_dtor (struct Archive *ptr_archive, int memory_flag) |
bool | Archive_is_good (struct Archive *ptr_archive) |
struct Input* | Archive_open (struct Archive *ptr_archive, int entry) |
struct Input* | Archive_open_Ex (struct Archive *ptr_archive, char *sz_name) |
struct Output* | Archive_open_write (struct Archive *ptr_archive, int entry) |
struct Output* | Archive_open_write_Ex (struct Archive *ptr_archive, char *sz_name) |
int | Archive_count_entries (struct Archive *ptr_archive) |
char* | Archive_get_name (struct Archive *ptr_archive, int entry) |
char* | Archive_archive_name (struct Archive *ptr_archive) |
An archive is a file that holds more files inside it, with possible compression of every one of them. Right now only one compression method is supported, but space for 254 more is reserved. You get standard Input* when opening a file from inside the archive, and you should handle it like regular input. If files are not compressed, random access methods can be used for their Input objects.
Currently, compressed streams do not support random access. Using archives is the preferred way to handle large groups of files. Getting files from an archive might be faster than opening a file, especially if there are a lot of them.
You must call the Archive_ctor() function before retrieving a file from an archive and Archive_dtor() afterward. The pointer to the archive of the current application can be obtained in the following manner:
#include <cybiko.h> ... struct module_t main_module; ... init_module( &main_module ); // main_module.m_process->module->archive is the pointer to the // Archive of the current application. ...
|
Returns the archive name.
|
|
Returns the number of entries (resources) in the archive.
|
|
Initializes an Archive object for a specified archive file.
|
|
Destructor of an Archive object.
|
|
Retrieves the name of the Nth entry.
|
|
Checks whether the Archive object is valid.
|
|
Opens an Input for the specified resource index.
|
|
Opens an Input from the archive for the file named.
|
|
All files in the archive are numbered.
|
|
Opens an Output for the archive file named.
|
Copyright © 2001 Cybiko, Inc. All rights reserved. | More information... |