JBlosc

Blosc Java Interface

License

License

BSD License for jblosc
BSD License for blosc
GroupId

GroupId

org.lasersonlab
ArtifactId

ArtifactId

jblosc
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

JBlosc
Blosc Java Interface
Project URL

Project URL

https://github.com/Blosc/JBlosc
Source Code Management

Source Code Management

https://github.com/Blosc/JBlosc

Download jblosc

How to add to project

<!-- https://jarcasting.com/artifacts/org.lasersonlab/jblosc/ -->
<dependency>
    <groupId>org.lasersonlab</groupId>
    <artifactId>jblosc</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.lasersonlab/jblosc/
implementation 'org.lasersonlab:jblosc:1.0.1'
// https://jarcasting.com/artifacts/org.lasersonlab/jblosc/
implementation ("org.lasersonlab:jblosc:1.0.1")
'org.lasersonlab:jblosc:jar:1.0.1'
<dependency org="org.lasersonlab" name="jblosc" rev="1.0.1">
  <artifact name="jblosc" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.lasersonlab', module='jblosc', version='1.0.1')
)
libraryDependencies += "org.lasersonlab" % "jblosc" % "1.0.1"
[org.lasersonlab/jblosc "1.0.1"]

Dependencies

compile (2)

Group / Artifact Type Version
junit : junit jar 4.12
net.java.dev.jna : jna jar 4.2.2

Project Modules

There are no modules declared in this project.
Travis CI Appveyor
Build Status Build status

JBlosc: A Java interface for Blosc

JBlosc is a Java seamless interface for C-Blosc. A simple example extracted from the unit tests:

int SIZE = 100 * 100 * 100;
ByteBuffer ibb = ByteBuffer.allocateDirect(SIZE * PrimitiveSizes.DOUBLE_FIELD_SIZE);
for (int i = 0; i < SIZE; i++) {
    ibb.putDouble(i);
}
JBlosc jb = new JBlosc();
ByteBuffer obb = ByteBuffer.allocateDirect(ibb.limit() + JBlosc.OVERHEAD);
jb.compress(5, Shuffle.BYTE_SHUFFLE, PrimitiveSizes.DOUBLE_FIELD_SIZE, ibb, ibb.limit(), obb, obb.limit());
ByteBuffer abb = ByteBuffer.allocateDirect(ibb.limit());
jb.decompress(obb, abb, abb.limit());
jb.destroy();
assertEquals(ibb, abb);

JBlosc is fast. See benchmaks here.

Installation

Installing C-Blosc

First of all, you need to install the C-Blosc library. In short, if you already have CMake and a C compiler in your system, executing the following commands should do the work:

cd c-blosc
mkdir build
cd build
cmake ..   # Add -DCMAKE_GENERATOR_PLATFORM=x64 for Win64 platforms
cmake --build . --target install

In Linux/Unix the Blosc library is typically installed in your system search path. However, on Windows you will need to copy the blosc.dll somewhere in your PATH (e.g. copy "c:\Program Files (x86)\blosc\lib\blosc.dll" c:\Windows\System32).

Also check that your OS, Java Virtual Machine and Blosc library are all using the same architecture (either 32 or 64 bit).

Installing JBlosc

After cloning the repo, move into the inner jblosc directory and build, test and install the package:

mvn clean install

If you want to use it in another Maven project, after installing JBlosc you can use it as a dependency like this:

    <dependencies>
        <dependency>
            <groupId>org.blosc</groupId>
            <artifactId>jblosc</artifactId>
            <version>JBLOSC_VERSION</version>
        </dependency>
    </dependencies>

Replace the JBLOSC_VERSION placeholder by the desired version.

org.lasersonlab

Versions

Version
1.0.1