Combine WindowedFile into PackFile to simplify the internals
The only user of WindowedFile is PackFile, and it did so by making
an anonymous inner subclass within its constructor. This is simply
too confusing to work with. The two classes are tightly integrated
and work together to implement pack access. Half of WindowedFile
is just exposing accessors for PackFile to call through.
Long ago both PackFile and PackIndex used WindowedFile to read
data on demand, so having the WindowedFile class made some degree
of sense. But in
667a84b6997e9048e0771168c98d2ffbca791937 (almost 2
years ago) Robin changed the pack index data to be read in one shot,
as that performed better than paging in the index on demand.
Since that change, the only real user of WindowedFile has been
PackFile. Its time they got married and reduced the overall
complexity of the library internals.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>