From 4f2d811b6907cfeef4967996239c6253cecc8fcb Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 6 Apr 2019 16:48:42 +0200 Subject: [PATCH] Optimize the getChunkFromContent function for the WUD implementations --- src/de/mas/wiiu/jnus/implementations/NUSDataProviderWUD.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWUD.java b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWUD.java index 126dfc3..69f62ce 100644 --- a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWUD.java +++ b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWUD.java @@ -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();