Crates.io | genezip |
lib.rs | genezip |
version | 0.1.0 |
source | src |
created_at | 2024-06-25 10:27:22.829716 |
updated_at | 2024-06-25 10:27:22.829716 |
description | An encoding CLI tool for compressing and decompressing raw genome information |
homepage | https://github.com/BradenEverson/genezip |
repository | https://github.com/BradenEverson/genezip |
max_upload_size | |
id | 1283207 |
size | 28,533 |
GeneZip is a Rust command-line tool designed to compress files containing strings of genetic information using Huffman encoding. Huffman encoding is an efficient method for compressing data by assigning variable-length codes to input characters based on their frequencies.
To install GeneZip, you need to have Rust and Cargo installed on your machine. If you don't have them installed, you can get them from rust-lang.org.
Once Rust and Cargo are installed, you can install GeneZip using the following command:
cargo install genezip
Note GeneZip is currently in an extremely beta phase. Huffman encoding is currently implemented, but without sequence-based-token encoding and run-based encoding it will always create larger files than before. GeneZip is being continuously updated and will receieve these features soon!
GeneZip provides two main commands: compress
and decompress
.
To compress a file, use the compress
command followed by the input file and the desired output file:
genezip compress <input_file> <output_file>
Compressing will create your desired compression file, alongside a serialized key
that holds the encodings necessary to decompress the genmoe file
Example:
genezip compress sequences.txt sequences.gzp
To decompress a file, use the decompress
command followed by the compressed file, the generated .gzpky key created from compressing and the desired output file:
genezip decompress <input_file> <key_file> <output_file>
Example:
genezip decompress sequences.gzp sequences.gzpky sequences.txt
Suppose you have a file genetic_data.txt
containing strings of genetic information. To compress this file, run:
genezip compress genetic_data.txt genetic_data.gzp
To decompress the previously compressed file genetic_data.gzp
, run:
genezip decompress genetic_data.gzp genetic_data.gzp.gzpky genetic_data_decompressed.txt
Contributions are welcome! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request. Please ensure your code adheres to the existing code style and includes appropriate tests.
GeneZip is licensed under the MIT License. See the LICENSE file for more information.