Handbook
Glossary
checksum-stream ( stream checksum -- value )
Factor handbook
»
Input and output
»
Checksums
Prev:
checksum-bytes ( bytes checksum -- value )
Next:
checksum-lines ( lines checksum -- value )
Vocabulary
checksums
Inputs
stream
an input stream
checksum
a checksum specifier
Outputs
value
a
byte-array
Generic word contract
Computes the checksum of all data read from the stream.
Side effects
Modifies
stream
Definition
IN:
checksums
GENERIC:
checksum-stream
( stream checksum -- value )
Methods
USING:
checksums
checksums.common
kernel
;
M:
block-checksum
checksum-stream
[
swap
add-checksum-stream
get-checksum
]
with-checksum-state
;
USING:
checksums
io
kernel
;
M:
checksum
checksum-stream
[
stream-contents
]
dip
checksum-bytes
;