Skip to content

Encode and decode files into seemingly empty repos using git tags

License

Notifications You must be signed in to change notification settings

arnav-kr/cryptags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CrypTags

Encode and decode files into seemingly empty repos using git tags

How it works

It utilizes the fact that git tags can store messages, and they only need a commit to attach to, and the fact that git allows creation of empty commits makes it more seamless. The file is compressed and base64 encoded, then split into chunks that fit within the git tag message size limit. Each chunk is stored as a separate git tag attached to the initial empty commit.

The decode script retrieves the tags, reconstructs the original file by decoding and decompressing the data. and saves it to disk.

Usage

The repo contains two scripts: encode.py and decode.py. To encode a file into git tags, run:

uv run encode.py <path/to/file>

or

python encode.py <path/to/file>

To decode the file from git tags, cd into the repo and run:

uv run decode.py

or

python decode.py

Author

Arnav Kumar

License

AGPL-3.0

About

Encode and decode files into seemingly empty repos using git tags

Topics

Resources

License

Stars

Watchers

Forks

Languages