GPac Library and GPackager Executable(C) 2013 Christian Gunderman
S V N Labs Softwares. Entrepreneur, Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer. Zlib is a software library used for data compression. Zlib was written by Jean-Loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used. Download latest “gpac-0.4.5.tar.gz.
This program is free software: you can redistribute it and/or modifyit under the terms of the GNU Lesser General Public License as publishedby the Free Software Foundation, either version 3 of the License, or(at your option) any later version.
This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU Lesser General Public License for more details.
![Gpac Software Package Downloader Gpac Software Package Downloader](/uploads/1/2/6/2/126298503/753248210.jpg)
You should have received a copy of the GNU Lesser General Public Licensealong with this program. If not, see http://www.gnu.org/licenses/.
Contact Email: [email protected]
INTRODUCTION:This package is a complete C library for simple packaging and unpackingof files into one main file, similar to a TAR archive, but in a uniqueformat. This library is useful for developers who need a way to packagea bunch of files together, but don't require compression or the abilityto extract the archive outside of their application. An example of thisis game developers who want to package game add on resources into onefile and have the ability to quickly extract them from the file straightinto memory. For the purpose of ease of use, this library comes with asimple command line application that demonstrates how to implement thelibrary.
GPackager:GPackager is meant primarily as a proof of concept for the library andand implementation aid, however, it works just fine and can be used,despite its reduced feature set.
GPAC FILE FORMAT:GPac files, the format that was created for use with this library,maintain the structure laid out below and are optimized for quick insertand extract operations at the cost of the inability to remove items fromthe package.
{GPac File Header}Contains a 'Gundersoft Pac' header that marks this as a GPac file, sothat it can be recognised, and a Name attribute for the file, as wellas an embedded file description.
![Package Package](/uploads/1/2/6/2/126298503/451979168.jpg)
{File Contents}The rest of the file alternates between GPACEntry structs containingthe embedded file name and size and Raw file data. Upon opening a GPacfor reading, the library checks for a header, loads it into the context,and then loads the next sizeOf(GPACEntry) bytes and attempts to read itas a file entry structure. This struct is added to a linked list of entries(a.k.a. the catalog), and then the file cursor skips ahead to the nextGPACEntry struct, located at the current cursor location + GPACEntry->entry->size. New files are added to the archive by simply appending anentry struct and the raw file data.