Skip to content

Commit 85cc94d

Browse files
author
yash-puligundla
committed
debug - add decodePack on top of CAT flag
1 parent 0204e8a commit 85cc94d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/htsjdk/samtools/cram/compression/range/RangeDecode.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ public class RangeDecode {
1313
private static final ByteBuffer EMPTY_BUFFER = ByteBuffer.allocate(0);
1414

1515
public ByteBuffer uncompress(final ByteBuffer inBuffer) {
16-
return uncompressStream(inBuffer, 0);
16+
return uncompress(inBuffer, 0);
1717
}
1818

19-
public ByteBuffer uncompressStream(final ByteBuffer inBuffer, int outSize) {
19+
public ByteBuffer uncompress(final ByteBuffer inBuffer, int outSize) {
2020
if (inBuffer.remaining() == 0) {
2121
return EMPTY_BUFFER;
2222
}
@@ -61,7 +61,7 @@ public ByteBuffer uncompressStream(final ByteBuffer inBuffer, int outSize) {
6161
if (rangeParams.isCAT()){
6262
byte[] data = new byte[outSize];
6363
inBuffer.get( data,0, outSize);
64-
return ByteBuffer.wrap(data);
64+
outBuffer = ByteBuffer.wrap(data);
6565
} else if (rangeParams.isExternalCompression()){
6666
byte[] extCompressedBytes = new byte[inBuffer.remaining()];
6767
int extCompressedBytesIdx = 0;
@@ -297,7 +297,7 @@ private ByteBuffer decodeStripe(ByteBuffer inBuffer, final int outSize){
297297
ulen[j]++;
298298
}
299299

300-
T[j] = uncompressStream(inBuffer, ulen[j]);
300+
T[j] = uncompress(inBuffer, ulen[j]);
301301
}
302302

303303
// Transpose

0 commit comments

Comments
 (0)