Skip to content

Commit 9380a28

Browse files
authored
Merge pull request #140 from jamesmudd/prepare-v0.5.3
Prepare v0.5.3
2 parents 07f1cb5 + d5dbe21 commit 9380a28

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

Diff for: CHANGES.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# jHDF Change Log
22

3+
## v0.5.3
4+
- Add support for chunked v4 datasets with b-tree chunk indexing
5+
- Improve exceptions for unsupported b-tree records
6+
- Improve test coverage
7+
- Upgrade to Gradle 6.0.1
8+
39
## v0.5.2
410
- Fix https://github.com/jamesmudd/jhdf/issues/124 String padding not handled correctly.
511
- Fix https://github.com/jamesmudd/jhdf/issues/132 Multi dimensional fixed length string datasets read incorrectly.

Diff for: jhdf/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ plugins {
2626

2727
// Variables
2828
group = 'io.jhdf'
29-
version = '0.5.2'
29+
version = '0.5.3'
3030
sourceCompatibility = 1.8
3131
targetCompatibility = 1.8
3232
// Set source encoding to UTF-8

Diff for: jhdf/src/main/java/io/jhdf/dataset/chunked/ChunkedDatasetBase.java

+13-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ private boolean partOfChunkIsOutsideDataset(final int chunkInternalOffsetIndex,
112112
/**
113113
* Calculates the linear offsets into the dataset for each of the chunks internal offsets. It can be thought of as
114114
* only doing this do the first chunk as to calculate the offsets required for any other chunk you need to add
115-
* the inital linear offset of that chunk to each of these values.
115+
* the initial linear offset of that chunk to each of these values.
116+
*
117+
* @param chunkInternalOffsets a chunk offset
118+
* @return offset in the dataset
116119
*/
117120
protected int[] getDataOffsets(int[] chunkInternalOffsets) {
118121

@@ -165,6 +168,8 @@ public ByteBuffer getDataBuffer() {
165168

166169
/**
167170
* Gets the number of linear steps to move for one step in the corresponding dimension
171+
*
172+
* @return array of the number of linear step to move for one step in each dimension
168173
*/
169174
private int[] getDimensionLinearOffsets() {
170175
int dimLength = getDimensions().length;
@@ -181,6 +186,10 @@ private int[] getDimensionLinearOffsets() {
181186

182187
/**
183188
* Gets the offsets inside a chunk where a contiguous run of data starts.
189+
*
190+
* @param chunkDimensions the dimensions of each chunk
191+
* @param elementSize number of bytes in a an dataset element
192+
* @return an array of locations inside the chunk where contiguous data starts
184193
*/
185194
protected int[] getChunkInternalOffsets(int[] chunkDimensions, int elementSize) {
186195
final int fastestChunkDim = chunkDimensions[chunkDimensions.length - 1];
@@ -198,6 +207,9 @@ protected int[] getChunkInternalOffsets(int[] chunkDimensions, int elementSize)
198207
/**
199208
* A partial chunk is one that is not completely inside the dataset. i.e. some of its contents are not part of the
200209
* dataset
210+
*
211+
* @param chunk The chunk to test
212+
* @return true if this is a partial chunk
201213
*/
202214
private boolean isPartialChunk(Chunk chunk) {
203215
final int[] datasetDims = getDimensions();

0 commit comments

Comments
 (0)