diff --git a/CHANGES.md b/CHANGES.md index e71adda8..d6715164 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # jHDF Change Log +## v0.5.3 +- Add support for chunked v4 datasets with b-tree chunk indexing +- Improve exceptions for unsupported b-tree records +- Improve test coverage +- Upgrade to Gradle 6.0.1 + ## v0.5.2 - Fix https://github.com/jamesmudd/jhdf/issues/124 String padding not handled correctly. - Fix https://github.com/jamesmudd/jhdf/issues/132 Multi dimensional fixed length string datasets read incorrectly. diff --git a/jhdf/build.gradle b/jhdf/build.gradle index b0ee1116..585b379b 100644 --- a/jhdf/build.gradle +++ b/jhdf/build.gradle @@ -26,7 +26,7 @@ plugins { // Variables group = 'io.jhdf' -version = '0.5.2' +version = '0.5.3' sourceCompatibility = 1.8 targetCompatibility = 1.8 // Set source encoding to UTF-8 diff --git a/jhdf/src/main/java/io/jhdf/dataset/chunked/ChunkedDatasetBase.java b/jhdf/src/main/java/io/jhdf/dataset/chunked/ChunkedDatasetBase.java index c0653538..487da363 100644 --- a/jhdf/src/main/java/io/jhdf/dataset/chunked/ChunkedDatasetBase.java +++ b/jhdf/src/main/java/io/jhdf/dataset/chunked/ChunkedDatasetBase.java @@ -112,7 +112,10 @@ private boolean partOfChunkIsOutsideDataset(final int chunkInternalOffsetIndex, /** * Calculates the linear offsets into the dataset for each of the chunks internal offsets. It can be thought of as * only doing this do the first chunk as to calculate the offsets required for any other chunk you need to add - * the inital linear offset of that chunk to each of these values. + * the initial linear offset of that chunk to each of these values. + * + * @param chunkInternalOffsets a chunk offset + * @return offset in the dataset */ protected int[] getDataOffsets(int[] chunkInternalOffsets) { @@ -165,6 +168,8 @@ public ByteBuffer getDataBuffer() { /** * Gets the number of linear steps to move for one step in the corresponding dimension + * + * @return array of the number of linear step to move for one step in each dimension */ private int[] getDimensionLinearOffsets() { int dimLength = getDimensions().length; @@ -181,6 +186,10 @@ private int[] getDimensionLinearOffsets() { /** * Gets the offsets inside a chunk where a contiguous run of data starts. + * + * @param chunkDimensions the dimensions of each chunk + * @param elementSize number of bytes in a an dataset element + * @return an array of locations inside the chunk where contiguous data starts */ protected int[] getChunkInternalOffsets(int[] chunkDimensions, int elementSize) { final int fastestChunkDim = chunkDimensions[chunkDimensions.length - 1]; @@ -198,6 +207,9 @@ protected int[] getChunkInternalOffsets(int[] chunkDimensions, int elementSize) /** * A partial chunk is one that is not completely inside the dataset. i.e. some of its contents are not part of the * dataset + * + * @param chunk The chunk to test + * @return true if this is a partial chunk */ private boolean isPartialChunk(Chunk chunk) { final int[] datasetDims = getDimensions();