RNArchive is a Python application that encodes files into RNA-like sequences and decodes them back to their original form. The program uses a simple mapping of bytes to RNA codons (A, C, G, U) and provides a graphical user interface for ease of use.
- Encode Files: Converts any file into an RNA-like sequence stored in
.rna
format. - Decode Files: Restores the original file from an
.rna
archive. - GUI Interface: Simple and intuitive interface using
tkinter
. - File Extension Preservation: Automatically stores and restores the correct file extension.
-
Encoding:
- Each byte of the input file is converted into a unique 4-base RNA codon.
- The file extension is preserved in the
.rna
archive for proper restoration.
-
Decoding:
- The
.rna
file is decoded back into its original binary data. - The preserved file extension ensures the file is saved with the correct type.
- The
-
Clone the repository:
git clone https://github.com/czett/RNArchive.git cd RNArchive
-
Install Python dependencies (if not already installed):
tkinter
(included with most Python distributions)- Standard Python libraries:
os
,itertools
-
Run the application:
python app.py
-
Use the graphical interface:
- Encoding:
- Click Upload File in the "Upload to encode" section.
- Enter a name for the
.rna
archive. - Select the destination folder.
- Decoding:
- Click Upload .rna File in the "Upload .rna to decode" section.
- Choose the
.rna
file to decode. - Select the destination folder to save the restored file.
- Encoding:
- Select a file (e.g.,
example.txt
). - Enter a name (e.g.,
example_archive
). - Save as
example_archive.rna
.
- Select
example_archive.rna
. - Save the restored file as
decoded_file.txt
(or its original extension).
- If an error occurs during encoding or decoding, an error message will be displayed at the top of the application.
- Ensure the input files are valid and
.rna
files were generated using RNArchive.
This project is licensed under the MIT License. See the LICENSE
file for details.