-
Notifications
You must be signed in to change notification settings - Fork 34
Description
At present, archive members can only be read in order: continuing to the next one consumes all data from the existing LimitedReader.
This makes it somewhat more difficult than it would otherwise be to check debsig-style signatures (for which an io.MultiReader(controlReader, dataReader) would otherwise be the perfect thing to pass to openpgp.CheckDetachedSignature) without (necessarily and unambiguously) copying everything into RAM.
At the expense of requiring a seekable file handle on the underlying file, one could switch from a LimitedReader interface to a SectionReader, to make reads still possible after ar.Next() has been called.
See blakesmith/ar#11 for a concrete idea of what's being proposed. (I'd be happy to provide a concrete implementation here as well should it be welcome; implemented above on top of blakesmith/ar before discovering that go-debian existed).