From 9a45d1276a55d7b82fb8d716e833c9329d27bd35 Mon Sep 17 00:00:00 2001 From: Phil <phil@grmr.de> Date: Fri, 10 Nov 2017 20:14:00 +0100 Subject: [PATCH] Add challenge description --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 73fc9c4..35bcf02 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,24 @@ Rust implementation of [golang challenge #1](http://golang-challenge.org/go-challenge1). A simple binary file format for a drum machine is given. The task is to reverse -it and implement a decoder it. +it and implement a decoder for it. + +## Example output + +With the challenge came some examples how the lost executable's outputs looked +like. In `fixtures/` are all the example binaries given. And in `src/tests.rs` +are the respective example outputs. + +``` +Saved with HW Version: 0.808-alpha +Tempo: 120 +(0) kick |x---|x---|x---|x---| +(1) snare |----|x---|----|x---| +(2) clap |----|x-x-|----|----| +(3) hh-open |--x-|--x-|x-x-|--x-| +(4) hh-close |x---|x---|----|x--x| +(5) cowbell |----|----|--x-|----| +``` ## File format @@ -27,7 +44,7 @@ Size | Encoding | Description 1 | u8 | id 4 | u32 | length of the name field (n_l) n | ASCII | name -16 | bool[] | data (encoded as information when to hit) +16 | bool[] | data (byte-wise when to hit: 0 for no, 1 for yes) ## To-do -- GitLab