Handbook
Glossary
parse-delta ( -- delta/f )
Vocabulary
git
Inputs
None
Outputs
delta/f
an
object
Definition
USING:
io
kernel
math
math.bitwise
;
IN:
git
:
parse-delta
( -- delta/f )
read1
[
dup
128
mask?
not
[
7
bits
read
<insert>
]
[
[
0 0
]
dip
dup
1
mask?
[
[
read1*
bitor
]
2dip
]
when
dup
2
mask?
[
[
read1*
8
shift
bitor
]
2dip
]
when
dup
4
mask?
[
[
read1*
16
shift
bitor
]
2dip
]
when
dup
8
mask?
[
[
read1*
24
shift
bitor
]
2dip
]
when
dup
16
mask?
[
[
read1*
bitor
]
dip
]
when
dup
32
mask?
[
[
read1*
8
shift
bitor
]
dip
]
when
dup
64
mask?
[
[
read1*
16
shift
bitor
]
dip
]
when
drop
[
65536
]
when-zero
<copy>
]
if
]
[
f
]
if*
;