https://github.com/jnyjny/meowmeow
MeowMeow - A Toy File Encoder/Decoder
https://github.com/jnyjny/meowmeow
article c codec file-decode file-encode meowmeow moomoo toy
Last synced: 11 months ago
JSON representation
MeowMeow - A Toy File Encoder/Decoder
- Host: GitHub
- URL: https://github.com/jnyjny/meowmeow
- Owner: JnyJny
- License: mit
- Created: 2019-06-25T01:54:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-06-09T15:12:19.000Z (about 1 year ago)
- Last Synced: 2025-06-09T16:26:21.932Z (about 1 year ago)
- Topics: article, c, codec, file-decode, file-encode, meowmeow, moomoo, toy
- Language: C
- Homepage:
- Size: 209 KB
- Stars: 22
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### MeowMeow - a file encoder/decoder
This project implements two commands in C, ```meow``` and ```unmeow```,
that will encode and decode a file in the **MeowMeow** encoding scheme.
While not intended to be useful in and of itself, the program is an
example of [how to structure a small to medium sized C command-line program][3].
#### Requirements
- C compiler
- GNU make
#### Build
0. Clone
```bash
$ git clone https://github.com/JnyJny/meowmeow.git
```
1. Compile
```bash
$ make
```
2. Run
```bash
$ ./meow < clear_text > meow_text
$ ./unmeow < meow_text | diff clear_text
$
```
#### MeowMeow Encoding Scheme
The **MeowMeow** encoding scheme is direct rip-off of another encoding
scheme, [MooMoo Encode][2]. In short, each byte in file is encoded
into a string "meowmeow" where uppercase indicates a 1 and lowercase
is a zero, in this case the string encodes a zero. Consider these three
bytes:
```C
unsigned char zeros = 0x0;
unsigned char ones = 0xff;
unsigned char camel = 0xA5;
```
- The value in ```zeros``` encodes to "meowmeow".
- The value in ```ones``` encodes to "MEOWMEOW".
- The value in ```camel``` encodes to "MeOwmEoW.
[2]: http://www.jabberwocky.com/software/moomooencode.html
[3]: https://github.com/JnyJny/articles/blob/master/c/multi-file-c-program/article.md