CompressedBF
Jump to navigation
Jump to search
A very poor compressed version of Brainfuck more suitable for golfing created by User:Joe.
Examples
Hello World 1
compbf:
>+8O+9šĵ+4O+7šĖ+7A#ƭ+6O+7šĒx-99z+6O+9šĖk+3x-5x-7ƭo+3O+8šĖ
bf:
>++++++++[<+++++++++>-]<.>++++[<+++++++>-]<+.+++++++..+++.>>++++++[<+++++++>-]<++.------------.>++++++[<+++++++++>-]<+.<.+++.------.--------.>>>++++[<++++++++>-]<+.
Hello World 2
compbf:
+8P+4P&#o&{<ġŕ\rr6nġŮpÞ+7A#ƭƣƦ#.-6.-8ƭ4o4##
bf:
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.++++++
Compression Algorithm
It uses run-length encoding plus a dictionary.
Syntax
Run-length Encoding
++++++++
can be compressed into +9
, where the symbol comes first and the number of times it repeats afterwards.
Singular symbols don't need a one after them.
Dictionary
Each double and triple combination of brainfuck symbols is given a key. The table is as follows:
Key | Code |
---|---|
0
|
++
|
1
|
+-
|
2
|
+<
|
3
|
+>
|
4
|
+.
|
5
|
+,
|
6
|
+[
|
7
|
+]
|
8
|
-+
|
9
|
--
|
a
|
-<
|
b
|
->
|
c
|
-.
|
d
|
-,
|
e
|
-[
|
f
|
-]
|
g
|
<+
|
h
|
<-
|
i
|
<<
|
j
|
<>
|
k
|
<.
|
l
|
<,
|
m
|
<[
|
n
|
<]
|
o
|
>+
|
p
|
>-
|
q
|
><
|
r
|
>>
|
s
|
>.
|
t
|
>,
|
u
|
>[
|
v
|
>]
|
w
|
.+
|
x
|
.-
|
y
|
.<
|
z
|
.>
|
A
|
..
|
B
|
.,
|
C
|
.[
|
D
|
.]
|
E
|
,+
|
F
|
,-
|
G
|
,<
|
H
|
,>
|
I
|
,.
|
J
|
,,
|
K
|
,[
|
L
|
,]
|
M
|
[+
|
N
|
[-
|
O
|
[<
|
P
|
[>
|
Q
|
[.
|
R
|
[,
|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