From fa7fda5890c16d3a68acbdbea2e20fd6c07ecbb6 Mon Sep 17 00:00:00 2001 From: dukantic Date: Sat, 27 Sep 2025 19:12:36 +0000 Subject: [PATCH] Edit README.md --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index b663cac..41c76ca 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,48 @@ -# Œufman -## Run -Install Rust Cargo -``` -cargo run -``` +# Oeufman: A Huffman Coding Playground -## How to use -``` -# Use "--" before argument if you run the project with cargo run - --compress , -c [] To compress a file. - --uncompress, -u [] To uncompress a file. - --print , -p To print a file compressed. +**Oeufman** is a Rust implementation of the Huffman coding algorithm, a classic method for lossless data compression. The name is a playful twist on "Huffman" — because why not add a little French flair (and a pun) to your compression tool? -``` +## The Joke: "Œufman" vs. "Huffman" +- **"Huffman"** is the name of the algorithm, named after its creator, David A. Huffman. +- **"Œuf"** means "egg" in French. So, **"Œufman"** sounds like "Huffman" but translates to "Eggman" — a silly, egg-themed version of the algorithm. +- It’s a lighthearted nod to the French language and a fun way to make a technical project memorable. + +--- + +## Features +- Compress files using Huffman coding. +- Decompress files back to their original form. +- Print the compressed file structure for debugging or learning. + +--- + +## Installation +1. Ensure you have [Rust and Cargo](https://www.rust-lang.org/tools/install) installed. +2. Clone this repository or download the source code. +3. Navigate to the project directory. + +--- + +## Usage +Run the project with `cargo run` and use the following arguments: + +| Argument | Short | Description | +|------------------|-------|--------------------------------------------------| +| `--compress` | `-c` | Compress a file. Usage: `-c []` | +| `--uncompress` | `-u` | Uncompress a file. Usage: `-u []`| +| `--print` | `-p` | Print the structure of a compressed file. | + +**Note:** Use `--` before arguments if running with `cargo run`. + +--- + +## Example +```sh +# Compress a file +cargo run -- --compress input.txt compressed.oeuf + +# Uncompress a file +cargo run -- --uncompress compressed.oeuf output.txt + +# Print the structure of a compressed file +cargo run -- --print compressed.oeuf