Optimize the getChunkFromContent function for the WUD implementations

This commit is contained in:
Maschell 2019-04-06 16:48:42 +02:00
parent a0ce50a4b5
commit 4f2d811b69

View File

@ -55,6 +55,11 @@ public class NUSDataProviderWUD extends NUSDataProvider {
return (long) Settings.WIIU_DECRYPTED_AREA_OFFSET + getGamePartition().getPartitionOffset();
}
@Override
public byte[] getChunkFromContent(Content content, long offset, int size) throws IOException {
return discReader.readEncryptedToByteArray(getOffsetInWUD(content), offset, size);
}
@Override
public InputStream getInputStreamFromContent(Content content, long fileOffsetBlock) throws IOException {
WUDDiscReader discReader = getDiscReader();