see also https://github.com/Dav1dde/nbd/blob/master/nbt.d lexer multifile lexer!!! It is possible for the file to stop in the middle of the road and continue in the next file. lookahead 1 char. LL parsing HL parsing http://hackerpilot.github.io/experimental/std_lexer/phobos/lexer.html std.stdio: wrapFile(FILE* ), FILE* getFP(); auto chunks(File f, size_t size); a ~ b to concatenate ranges! Toplevel Stream compatible to substreams Stream transcoders for zlib tiff CCITT Fax [can also be abused for ZIP, i.e. epub] special streams: pdf content stream factor Name out into its own library.