Handbook
Glossary
read-union-footer ( -- footer-offset footer )
Vocabulary
tools
.
image
Inputs
None
Outputs
footer-offset
an
integer
footer
an
embedded-image-footer.union
Word description
read the footer at given offset from beginning of file. Reads footer from end of file, while returning to current file position. Also returns offset to footer from beginning of file.
Definition
USING:
classes.struct
io
kernel
math
;
IN:
tools.image
:
read-union-footer
( -- footer-offset footer )
[
embedded-image-footer.union
[
struct-size
neg
seek-end
seek-input
tell-input
]
[
read-struct*
]
bi
]
with-position
;