Skip to content

Wassimulator/SimplyPack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimplyPack

v1.0
by: Wassimulator

A very simple and straightforward package manager for games, written in C. Use SimplyPack.exe or compile simplypack.cpp to use the packer.

The Packer

SimplyPack.exe takes 3 arguments:
1 - The path to the folder from which to pack files, relative to the location of the exe
2 - The path to the output file, relative to the location of the exe
3 - 1 or 0 to display detailed output of what was packed (optional)
The packer is pretty simple, and will pack everything inside the folder you specify.
reserving a header at the beginning that contains the following information consecutively:

  • The number of files packed
  • An array of structs of the type SP_fileinfo which contain:
    - original file name
    - original file size
    - packed file location (relative to the beginning of the pack file)

The Unpacker

To use the unpacker make sure you first call SP_OpenPack with the path to the pack file. This call copies the pack into memory. SP_GetData gets you a pointer to the data stored in memory, you should use this pointer to read the data, make sure you copy it. SP_ClosePack frees the memory used by the pack. The algorithm doesn't hash but instead matches file names. This tool intended for smaller projects.

Dependencies: tinydir.h, included in the project, please read the copyright information for that in the file. Licensing info at the bottom.

About

A simple and straightforward package manager for games.

Resources

License

Stars

Watchers

Forks

Packages

No packages published