FM Archive is a command-line utility for creating and expanding custom, encrypted, and text-encoded archives.
It securely packages specified files and directories into a format designed to be highly portable and capable of bypassing strict email attachment filters (like Gmail's).
The internal workflow is as follows:
- Package files into a TAR archive.
- Split the archive into manageable chunks.
- For each chunk: a. Apply a text-based encoding (e.g., Base64, z85). b. Compress the text using FM-Index. c. Encrypt the result with AES-GCM (using your key). d. Apply text-encoding again to the final encrypted binary.
- Store all resulting
.txtchunks in a standard ZIP file.
The primary advantage of FM Archive is its ability to bypass aggressive attachment filters, such as those used by Gmail.
This is achieved through two key features:
- Standard ZIP Format: The resulting archive is a standard, non-password-protected
.zipfile. This format is recognized as safe by almost all systems. - Text File Contents: All data chunks (which are encrypted and disguised) are stored as harmless
.txtfiles within the archive.
Because the archive itself and its contents are treated as "text," it can be attached and sent via email without being flagged by filters.
This "disguise work" (encryption + text encoding) comes at a cost.
Compared to a standard ZIP compression of the same files, the final .zip file generated by FM Archive may be approximately 20% larger.
This is the trade-off for achieving both security (unreadable by third parties) and portability (ease of emailing).
Before using FM Archive, you must create a config.json file in the same directory as the executable. This file controls the core operation of the tool.
Example config.json:
{
"default_name": "my_archive",
"cryptography_key": "Your-Super-Secret-Key-String",
"compression_level": 0,
"text_encoder": "base64"
}FM Archive is operated via the command line.
Displays version information.
fmarchive -iDisplays help information.
fmarchive -hPackages one or more files or directories into a new .zip archive.
# Explicit 'create' command
fmarchive c path/to/file.txt path/to/folder
# Default action (if paths are not .zip)
fmarchive path/to/file.txt path/to/folderExtracts the contents of one or more FM Archive .zip files.
# Explicit 'expand' command
fmarchive x my_archive.zip
# Default action (if path is a .zip)
fmarchive my_archive.zipThe config.json file has the following properties:
-
default_name(string): The default filename (without extension) to use when creating a new archive. -
cryptography_key(string): This is your secret password. It is used to generate the encryption key. Keep this safe! -
compression_level(number): The compression level for the final ZIP archive that holds the text files.0: Optimal (Default)1: Fastest2: NoCompression3: SmallestSize
-
text_encoder(string): The text encoding used to disguise the binary chunks. (Note:base64is recommended as it interacts best with the FM-Index compression stage)."base32": (Case-insensitive)"base64": (Recommended for compression)"base122": (Experimental)"z85": (Space-efficient, safe text)
I've also included the C# implementations for Base32, Base122, and z85 (used by this tool) in the repository. Feel free to use them in your own projects.