Skip to content

Commit

Permalink
Merge pull request #140 from jamesmudd/prepare-v0.5.3
Browse files Browse the repository at this point in the history
Prepare v0.5.3
  • Loading branch information
jamesmudd authored Nov 28, 2019
2 parents 07f1cb5 + d5dbe21 commit 9380a28
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion jhdf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down Expand Up @@ -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;
Expand All @@ -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];
Expand All @@ -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();
Expand Down

0 comments on commit 9380a28

Please sign in to comment.