$ rm fizzbuzz && touch fizzbuzz
$ zpaqd c fizzbuzz.cfg fizzbuzz.zpaq fizzbuzz
Appending fizzbuzz.zpaq at 0
syscmd("touch "fizzbuzz" zpaq.tmp") returns 0
fizzbuzz 0 -> 175
WARNING: fizzbuzz: post-processor mismatch: 0 -> 371221
fizzbuzz.zpaq 0 -> 176 (1 errors)
Memory utilization:
0 icm 7: 127/8192 (1.55%)
0.01 seconds
$ zpaq x fizzbuzz.zpaq -out result
zpaq v7.15 journaling archiver, compiled Nov 29 2021
fizzbuzz.zpaq: 1 versions, 1 files, 1 fragments, 0.000176 MB
Extracting -0.000001 MB in 1 files -threads 8
> result/fizzbuzz
1 streaming segments extracted
0.030 seconds (all OK)
$ tail result/fizzbuzz.zpaq
Fizz
65017
65018
Fizz
Buzz
65021
Fizz
65023
65024
FizzBuzz
$ du --apparent-size -h fizzbuzz.zpaq result/fizzbuzz
176 fizzbuzz. zpaq
363K result/fizzbuzz
$
Last active
November 29, 2021 13:23
-
-
Save otya128/8d2b56cbcad75ef99aa0bec339345a6f to your computer and use it in GitHub Desktop.
FizzBuzz in zpaq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
comp 0 0 12 12 1 | |
0 icm 7 | |
hcomp | |
halt | |
pcomp touch ; | |
c= 0 | |
a++ | |
a>c if | |
halt | |
endif | |
b=0 | |
do | |
b++ | |
a=b | |
d= 15 | |
a%=d | |
a==c if | |
a= 70 out | |
a= 105 out | |
a= 122 out out | |
a= 66 out | |
a= 117 out | |
a= 122 out out | |
a= 10 out | |
else | |
d= 3 | |
a=b | |
a%=d | |
a==c if | |
a= 70 out | |
a= 105 out | |
a= 122 out out | |
a= 10 out | |
else | |
d= 5 | |
a=b | |
a%=d | |
a==c if | |
a= 66 out | |
a= 117 out | |
a= 122 out out | |
a= 10 out | |
else | |
a=b | |
r=a 11 | |
do | |
d= 10 | |
a%=d | |
*c=a | |
a=b | |
a/=d | |
b=a | |
c++ | |
d= 0 | |
a>d | |
while | |
do | |
c-- | |
a=*c | |
a+= 48 | |
out | |
a=c | |
a>d | |
while | |
b=r 11 | |
a= 10 out | |
endif | |
endif | |
endif | |
a=b | |
a/= 255 | |
a< 255 | |
while | |
halt | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment