diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 29bc28a..d6ad167 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -53,6 +53,15 @@ jobs:
fi
mvn -B release:prepare $MVN_ARGS
+ - name: Check release.properties
+ run: |
+ if [ ! -f release.properties ]; then
+ echo "release.properties not found"
+ exit 1
+ fi
+ echo "Contents of release.properties:"
+ cat release.properties
+
- name: Determine release version
id: version
run: |
diff --git a/README.md b/README.md
index 2ef8fc5..8fcd32c 100644
--- a/README.md
+++ b/README.md
@@ -104,53 +104,62 @@ non-vectorized implementation. For an example usage, see
examples/vector/Example.java. The feature requires JDK 19+ and is currently for
advanced users.
-JavaFastPFOR as a dependency (JitPack)
+JavaFastPFOR as a dependency
------------------------
+JavaFastPFOR is available both on Maven Central and JitPack, so you can easily
+include it in your project using either source.
+
We have a demo project using JavaFastPFOR as a dependency (both Maven and Gradle). See...
https://github.com/fast-pack/JavaFastPFORDemo
-1. **Maven**
+### Maven Central
+
+You can add JavaFastPFOR directly from Maven Central — no extra repository configuration needed:
-Using this code in your own project is easy with maven, just add
-the following code in your pom.xml file:
+**Maven**
```xml
-
- com.github.fast-pack
- JavaFastPFor
- JavaFastPFOR-0.3.2
-
+
+ me.lemire.integercompression
+ JavaFastPFOR
+ 0.3.8
+
```
-as well as jitpack as a repository...
+**Gradle (Groovy)**
-```xml
-
-
- jitpack.io
- https://jitpack.io
-
-
+```groovy
+dependencies {
+ implementation 'me.lemire.integercompression:JavaFastPFOR:0.3.8'
+}
```
-Naturally, you should replace "version" by the version
-you desire.
+### JitPack
+If you prefer or need to use JitPack, you can include the dependency like this:
-2. **Gradle (groovy)**
+**Maven**
+```xml
+
+
+ jitpack.io
+ https://jitpack.io
+
+
+
+
+ com.github.fast-pack
+ JavaFastPFOR
+ JavaFastPFOR-0.3.8
+
+```
-Then all you need is to edit your `build.gradle` file like so:
-
+**Gradle (groovy)**
```groovy
-plugins {
- id 'java'
-}
-
-
repositories {
mavenCentral()
maven {
@@ -159,11 +168,10 @@ repositories {
}
dependencies {
- implementation 'com.github.fast-pack:JavaFastPFor:JavaFastPFOR-0.3.2'
+ implementation 'com.github.fast-pack:JavaFastPFOR:JavaFastPFOR-0.3.8'
}
```
-
Naturally, you should replace "version" by the version
you desire.
diff --git a/pom.xml b/pom.xml
index ac78f6d..769bd98 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
4.0.0
me.lemire.integercompression
JavaFastPFOR
- 0.3.8
+ 0.3.9
jar
21
@@ -23,7 +23,7 @@
scm:git:https://github.com/fast-pack/JavaFastPFOR.git
scm:git:https://github.com/fast-pack/JavaFastPFOR.git
scm:git:https://github.com/fast-pack/JavaFastPFOR.git
- JavaFastPFOR-0.3.8
+ JavaFastPFOR-0.3.9
diff --git a/src/main/java/me/lemire/longcompression/differential/LongDelta.java b/src/main/java/me/lemire/longcompression/differential/LongDelta.java
index 184e53c..8399f94 100644
--- a/src/main/java/me/lemire/longcompression/differential/LongDelta.java
+++ b/src/main/java/me/lemire/longcompression/differential/LongDelta.java
@@ -107,7 +107,7 @@ public static void fastinverseDelta(long[] data) {
}
}
- for (; i != data.length; ++i) {
+ for (; i < data.length; ++i) {
data[i] += data[i - 1];
}
}
diff --git a/src/test/java/me/lemire/longcompression/LongDeltaTest.java b/src/test/java/me/lemire/longcompression/LongDeltaTest.java
new file mode 100644
index 0000000..bfa1e6f
--- /dev/null
+++ b/src/test/java/me/lemire/longcompression/LongDeltaTest.java
@@ -0,0 +1,23 @@
+package me.lemire.longcompression;
+
+import me.lemire.longcompression.differential.LongDelta;
+import org.junit.Test;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class LongDeltaTest {
+ @Test
+ public void testEmptyArrayFastInverseDelta() {
+ LongCompressor compressor = new LongCompressor();
+ long[] input = new long[0];
+
+ LongDelta.delta(input);
+ long[] compressed = compressor.compress(input);
+ long[] result = compressor.uncompress(compressed);
+ LongDelta.fastinverseDelta(result);
+
+ assertNotNull(result);
+ assertArrayEquals(input, result);
+ }
+}