fix Makefile and README.md for 2019/diels-grabsch1
This commit is contained in:
1 parent
de558ba195
commit
7715e6eee0
2 files changed
+166
-354
No files matched your search
@@ -1,28 +1,34 @@
|
||||
# Best small program
|
||||
|
||||
Volker Diels-Grabsch
|
||||
<https://njh.eu>
|
||||
Volker Diels-Grabsch
|
||||
<https://njh.eu>
|
||||
|
||||
# To build:
|
||||
|
||||
## Judges' comments:
|
||||
### To use:
|
||||
```sh
|
||||
make
|
||||
```
|
||||
|
||||
make
|
||||
### To run:
|
||||
|
||||
./prog < file > file.Z
|
||||
```sh
|
||||
./prog < file > file.Z
|
||||
```
|
||||
|
||||
### Try:
|
||||
|
||||
dd bs=1024 count=2048 < /dev/zero | compress > ref.Z
|
||||
dd bs=1024 count=2048 < /dev/zero | ./prog > dg1.Z
|
||||
cmp ref.Z dg1.Z
|
||||
```sh
|
||||
dd bs=1024 count=2048 < /dev/zero | compress > ref.Z
|
||||
dd bs=1024 count=2048 < /dev/zero | ./prog > dg1.Z
|
||||
cmp ref.Z dg1.Z
|
||||
|
||||
compress < ../mills/Shakespeare.txt > ref.Z
|
||||
./prog < ../mills/Shakespeare.txt > dg1.Z
|
||||
cmp ref.Z dg1.Z # Oops, the files differ
|
||||
zcat < dg1.Z | cmp - ../mills/Shakespeare.txt # Decompresses correctly. What is going on?
|
||||
compress < ../mills/Shakespeare.txt > ref.Z
|
||||
./prog < ../mills/Shakespeare.txt > dg1.Z
|
||||
cmp ref.Z dg1.Z # Oops, the files differ
|
||||
zcat < dg1.Z | cmp - ../mills/Shakespeare.txt # Decompresses correctly. What is going on?
|
||||
```
|
||||
|
||||
### Selected Judges Remarks:
|
||||
## Judges' comments:
|
||||
|
||||
Finally, IOCCC now has its own text compression program, and it is short
|
||||
enough to qualify for the Best Short Program award! That said, can you
|
||||
@@ -33,16 +39,21 @@ Can you explain why the zero file compresses identically by the entry and the
|
||||
standard compress tool, but the text file compresses differently? The judges know. :)
|
||||
|
||||
## Author's comments:
|
||||
|
||||
### A tiny "compress" tool
|
||||
|
||||
`Usage:`
|
||||
|
||||
./prog < guidelines.txt > guidelines.txt.Z
|
||||
```sh
|
||||
./prog < guidelines.txt > guidelines.txt.Z
|
||||
```
|
||||
|
||||
`Check for correctness:`
|
||||
|
||||
zcat guidelines.txt.Z > guidelines2.txt
|
||||
diff -s guidelines.txt guidelines2.txt
|
||||
```sh
|
||||
zcat guidelines.txt.Z > guidelines2.txt
|
||||
diff -s guidelines.txt guidelines2.txt
|
||||
```
|
||||
|
||||
`Of course you can`
|
||||
`also use 2015/mills2 instead of zcat to verify the output`
|
||||
@@ -54,11 +65,10 @@ standard compress tool, but the text file compresses differently? The judges kno
|
||||
`32-bit and 64-bit platforms. It compiles without warnings`
|
||||
`on both GCC and Clang even with -Wextra and -Weverything.`
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
<!--
|
||||
## Copyright:
|
||||
|
||||
(c) Copyright 1984-2019, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
Reference in new issue
Block a user