comment on byte-streams

This commit is contained in:
Rolf-Thomas Happe 2003-04-23 17:24:13 +00:00
parent 746040e917
commit 637584b40f
1 changed files with 19 additions and 7 deletions

View File

@ -72,6 +72,18 @@ Get the physical width W resp. height H in dots per inch from INFO.
Byte-streams, or b.s.s for short, are random-access lazy byte sources.
The image-info project doesn't commit to the current implementation,
i.e. create and access b.s.s by the procedures below or blame yourself.
[ Why do we need random-access sources? -- Actually, we don't really.
Random-access buys us a minor architectural edge. We could --just
as Marco Schmidt's original Java program-- read the first two bytes
or so from a port, identify the graphics format and dispatch to the
specialist who deals with the rest of the file. That is, we could
scatter the expertise on graphics formats, with the dispatcher knowing
magic numbers, and others knowing the rest. We could -- but we
choose to encapsulate the expert knowledge on gif, jpeg, png formats
in respective parsing procedures. If one expert cannot parse
a file we ask the next. And while this may not be very wise, it is
conveniently done with b.s.s.
]
(inport->byte-stream in) --> bs