From 85cc94d093d07a9331ead9e73d12f87a0fc7d493 Mon Sep 17 00:00:00 2001 From: yash-puligundla Date: Tue, 21 Mar 2023 14:32:39 -0400 Subject: [PATCH] debug - add decodePack on top of CAT flag --- .../samtools/cram/compression/range/RangeDecode.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/htsjdk/samtools/cram/compression/range/RangeDecode.java b/src/main/java/htsjdk/samtools/cram/compression/range/RangeDecode.java index ca33d32a62..a5d85e0946 100644 --- a/src/main/java/htsjdk/samtools/cram/compression/range/RangeDecode.java +++ b/src/main/java/htsjdk/samtools/cram/compression/range/RangeDecode.java @@ -13,10 +13,10 @@ public class RangeDecode { private static final ByteBuffer EMPTY_BUFFER = ByteBuffer.allocate(0); public ByteBuffer uncompress(final ByteBuffer inBuffer) { - return uncompressStream(inBuffer, 0); + return uncompress(inBuffer, 0); } - public ByteBuffer uncompressStream(final ByteBuffer inBuffer, int outSize) { + public ByteBuffer uncompress(final ByteBuffer inBuffer, int outSize) { if (inBuffer.remaining() == 0) { return EMPTY_BUFFER; } @@ -61,7 +61,7 @@ public ByteBuffer uncompressStream(final ByteBuffer inBuffer, int outSize) { if (rangeParams.isCAT()){ byte[] data = new byte[outSize]; inBuffer.get( data,0, outSize); - return ByteBuffer.wrap(data); + outBuffer = ByteBuffer.wrap(data); } else if (rangeParams.isExternalCompression()){ byte[] extCompressedBytes = new byte[inBuffer.remaining()]; int extCompressedBytesIdx = 0; @@ -297,7 +297,7 @@ private ByteBuffer decodeStripe(ByteBuffer inBuffer, final int outSize){ ulen[j]++; } - T[j] = uncompressStream(inBuffer, ulen[j]); + T[j] = uncompress(inBuffer, ulen[j]); } // Transpose