Skip to content

Commit

Permalink
Add method to get decompressed chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
marcobitplane authored Sep 23, 2024
1 parent a7a17b8 commit faf0d3a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions jhdf/src/main/java/io/jhdf/dataset/chunked/ChunkedDatasetBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,16 @@ public ByteBuffer getRawChunkBuffer(int[] chunkOffset) {
return getDataBuffer(chunk);
}

@Override
public byte[] getDecompressedChunk(int[] chunkOffset) {
final Chunk chunk = getChunk(new ChunkOffset(chunkOffset));
if (chunk == null) {
throw new HdfException("No chunk with offset " + Arrays.toString(chunkOffset) +
" in dataset: " + getPath());
}
return decompressChunk(chunk);
}

private Collection<Chunk> getAllChunks() {
return getChunkLookup().values();
}
Expand Down

0 comments on commit faf0d3a

Please sign in to comment.