Commit Graph

4 Commits

Author SHA1 Message Date
Maurice Makaay 65895ac502 Making parsekit.reader both simpler and more complex (more complex by adopting some buffer allocation logic from the built-in bytes package, to not be copying memory all the time during the read operations. 2019-06-09 21:55:01 +00:00
Maurice Makaay 9656cd4449 The parsekit.reader.Reader now caches error messages that are returned from
the embedded io.Reader. When an error is returned, the read offset and the
error are stored. When later on, the same of a higher offset is requested,
the error is returned again. This way the code will work for Readers that do
not repeatedly return the correct error when calling the Read() method
multiple times arter a first error has occurred.

Note: I am not sure if there are any Reader implementations that wouldn't
return the same error message over and over again, but hardening the
parsekit Reader to support this is not hard, so let's just go for it.
2019-06-09 19:42:20 +00:00
Maurice Makaay 9f5caa2024 Backup work. 2019-06-08 22:48:56 +00:00
Maurice Makaay 98d2db0374 Moved Reader into its own package. 2019-06-07 10:55:55 +00:00