Handbook
Glossary
(lit-to-bits) ( lit -- bitarr )
Vocabulary
compression
.
gzip
.
private
Inputs
lit
an
object
Outputs
bitarr
an
object
Definition
USING:
bit-arrays
combinators
kernel
math
math.bits
sequences
;
IN:
compression.gzip.private
:
(lit-to-bits)
( lit -- bitarr )
{
{
[
dup
144
<
]
[
48
+
8
<bits>
>bit-array
reverse
]
}
{
[
dup
256
<
]
[
144
-
400
+
9
<bits>
>bit-array
reverse
]
}
{
[
dup
280
<
]
[
256
-
7
<bits>
>bit-array
reverse
]
}
[
280
-
192
+
8
<bits>
>bit-array
reverse
]
}
cond
;