Skip to content
This repository has been archived by the owner on Apr 8, 2018. It is now read-only.

ihaveamac/FAIL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

FAIL

This is basically a file archiving format nobody asked for, I guess.

I created this mostly because I wanted to practice with Python a bit. This is a file container that does nothing more than store the filename, its size, and the actual contents.

The name "FAIL" is from possibly all the things I've done so wrong making this, as well as all the things it doesn't support (like directories), and things I could have done better. But hey, I had fun.

I noticed this generates a larger file than a darc, huh. Maybe because of how I store filenames.

Usage

python buildfail.py myarchive.fail thing.bin *.zip game.3dsx
python extractfail.py myarchive.fail directory

Format

The file is layed out like this:

  • Base header (0x8 bytes)
  • File headers, one for each file (0x108 bytes)
  • Contents of all files joined together

The offset of a file is calculated by getting the size of all the headers combined plus the size of each file before it.

Base header

Offset Size Description
0x0 0x4 Magic "FAIL"
0x4 0x2 Archive format version
0x6 0x2 Number of files

File header

Offset Size Description
0x0 0x4 Magic "FILE"
0x4 0x100 File name
0x4 0x4 File size

License

Public Domain Mark

About

a stupid simple file container

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages