|
BRa 0.4.0
|
BR-Archive (BRa) is an educational project to compress files with various algorithms and creating self-extracting-archives (SFX).
The main compression algorithm will be the classical '90s, and later on looking to use the asymmetric number system technique.
It is focusing mostly on the compression algorithms and not in a better architecture or structure of the project, lacking some of better software engineering aspects. So expects to have some technical and architectural debt as it is mostly a free time for fun project.
The Default extension for the archive format is .BRa
Wildcard expansion rely on the shell or runtime; see Wildcard Expansions below.
This lays the foundation for encoding, decoding, and self-extracting archives.
[!NOTE] This project aims to avoid using third-party libraries.
It is mostly written in C with some exceptions for C++. final programs are in C++.
The exception is for the filesystem module aspect that is using C++ filesystem module to have a simpler cross-os filesystem APIs.
(Not interested for this project to implement FS primitives for each specific OS in plain C).
The self extracting archive will be created in the following formats:
an .EXE SFX will be generated for MS Windows oriented systems.
an .BRx SFX will be generated for Linux oriented systems.
Currently supported wildcards: * and ?.
Notes:
- On POSIX shells and PowerShell, patterns are expanded by the shell; quote them to prevent expansion if you want BRa to receive the pattern literally.
- On Windows cmd.exe, patterns are expanded by the C runtime (setargv) enabled in
MINGW32build; use^or quotes to prevent expansion.- BRa itself only expands directory arguments to
dir/*(non-recursive); empty directories are intentionally not archived.- Examples:
*.txt,image_??.png
Each entry name (file or directory) is limited to 255 bytes after UTF‑8 encoding. The limit applies to a single path component (no parent path) and does not include the trailing NULL.
Entries whose single‑component name exceeds 255 bytes are rejected at pack time and treated as invalid during extraction.