@Override
	public long length() throws IOException {
		long currentMax = 0;
		for (OverlayRange range : overlayList) {
			currentMax = Math.max(currentMax, range.getEndIndex());
		}
		return Math.max(currentMax, provider.length());
	}
This byte provider is used to store decompressed chunks at specific locations.
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/util/OverlayByteProvider.java