Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename to v3 #222

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Compression for Java
[![Maven Central](https://img.shields.io/maven-central/v/io.airlift/aircompressor.svg?label=Maven%20Central)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.airlift%22%20AND%20a%3A%22aircompressor%22)
[![Maven Central](https://img.shields.io/maven-central/v/io.airlift/aircompressor-v3.svg?label=Maven%20Central)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.airlift%22%20AND%20a%3A%22aircompressor-v3%22)

This library provides a set of compression algorithms implemented in pure Java and
where possible native implementations. The Java implementations use `sun.misc.Unsafe`
Expand All @@ -8,8 +8,8 @@ to interact directly with native libraries without the need for JNI.

# Usage

Each algorithm provides a simple block compression API using the `io.airlift.compress.v2.Compressor`
and `io.airlift.compress.v2.Decompressor` classes. Block compression is the simplest form of
Each algorithm provides a simple block compression API using the `io.airlift.compress.v3.Compressor`
and `io.airlift.compress.v3.Decompressor` classes. Block compression is the simplest form of
which simply compresses a small block of data provided as a `byte[]`, or more generally a
`java.lang.foreign.MemorySegment`. Each algorithm may have one or more streaming format
which typically produces a sequence of block compressed chunks.
Expand Down Expand Up @@ -109,7 +109,7 @@ This library requires a Java 22+ virtual machine containing the `sun.misc.Unsafe
Temporary directory used to unpack and load native libraries can be configured using the `aircompressor.tmpdir` system property,
with a default value of `java.io.tmpdir`. This is useful when the default temporary directory is mounted as `noexec`.

Loading of native libraries can be disabled entirely by setting the `io.airlift.compress.v2.disable-native` system property.
Loading of native libraries can be disabled entirely by setting the `io.airlift.compress.v3.disable-native` system property.

# Users

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</parent>

<groupId>io.airlift</groupId>
<artifactId>aircompressor</artifactId>
<version>2.1-SNAPSHOT</version>
<artifactId>aircompressor-v3</artifactId>
<version>3.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>aircompressor</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2;
package io.airlift.compress.v3;

import java.lang.foreign.MemorySegment;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2;
package io.airlift.compress.v3;

import java.lang.foreign.MemorySegment;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2;
package io.airlift.compress.v3;

public class IncompatibleJvmException
extends RuntimeException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2;
package io.airlift.compress.v3;

public class MalformedInputException
extends RuntimeException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.bzip2;
package io.airlift.compress.v3.bzip2;

import io.airlift.compress.v2.hadoop.CodecAdapter;
import io.airlift.compress.v3.hadoop.CodecAdapter;

public class BZip2Codec
extends CodecAdapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* <[email protected]> to whom the Ant project is very grateful for his
* great code.
*/
package io.airlift.compress.v2.bzip2;
package io.airlift.compress.v3.bzip2;

/**
* Base class for both the compress and decompress classes. Holds common arrays,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.bzip2;
package io.airlift.compress.v3.bzip2;

import io.airlift.compress.v2.hadoop.HadoopInputStream;
import io.airlift.compress.v3.hadoop.HadoopInputStream;

import java.io.BufferedInputStream;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.bzip2;
package io.airlift.compress.v3.bzip2;

import io.airlift.compress.v2.hadoop.HadoopOutputStream;
import io.airlift.compress.v3.hadoop.HadoopOutputStream;

import java.io.IOException;
import java.io.OutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.bzip2;
package io.airlift.compress.v3.bzip2;

import io.airlift.compress.v2.hadoop.HadoopInputStream;
import io.airlift.compress.v2.hadoop.HadoopOutputStream;
import io.airlift.compress.v2.hadoop.HadoopStreams;
import io.airlift.compress.v3.hadoop.HadoopInputStream;
import io.airlift.compress.v3.hadoop.HadoopOutputStream;
import io.airlift.compress.v3.hadoop.HadoopStreams;

import java.io.InputStream;
import java.io.OutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
* <[email protected]> to whom the Ant project is very grateful for his
* great code.
*/
package io.airlift.compress.v2.bzip2;
package io.airlift.compress.v3.bzip2;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;

import static io.airlift.compress.v2.bzip2.BZip2Constants.G_SIZE;
import static io.airlift.compress.v2.bzip2.BZip2Constants.MAX_ALPHA_SIZE;
import static io.airlift.compress.v2.bzip2.BZip2Constants.MAX_SELECTORS;
import static io.airlift.compress.v2.bzip2.BZip2Constants.N_GROUPS;
import static io.airlift.compress.v2.bzip2.BZip2Constants.RUN_A;
import static io.airlift.compress.v2.bzip2.BZip2Constants.RUN_B;
import static io.airlift.compress.v3.bzip2.BZip2Constants.G_SIZE;
import static io.airlift.compress.v3.bzip2.BZip2Constants.MAX_ALPHA_SIZE;
import static io.airlift.compress.v3.bzip2.BZip2Constants.MAX_SELECTORS;
import static io.airlift.compress.v3.bzip2.BZip2Constants.N_GROUPS;
import static io.airlift.compress.v3.bzip2.BZip2Constants.RUN_A;
import static io.airlift.compress.v3.bzip2.BZip2Constants.RUN_B;

/**
* An input stream that decompresses from the BZip2 format (without the file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.bzip2;
package io.airlift.compress.v3.bzip2;

import java.io.IOException;
import java.io.OutputStream;

import static io.airlift.compress.v2.bzip2.BZip2Constants.G_SIZE;
import static io.airlift.compress.v2.bzip2.BZip2Constants.MAX_ALPHA_SIZE;
import static io.airlift.compress.v2.bzip2.BZip2Constants.MAX_SELECTORS;
import static io.airlift.compress.v2.bzip2.BZip2Constants.N_GROUPS;
import static io.airlift.compress.v2.bzip2.BZip2Constants.RUN_A;
import static io.airlift.compress.v2.bzip2.BZip2Constants.RUN_B;
import static io.airlift.compress.v3.bzip2.BZip2Constants.G_SIZE;
import static io.airlift.compress.v3.bzip2.BZip2Constants.MAX_ALPHA_SIZE;
import static io.airlift.compress.v3.bzip2.BZip2Constants.MAX_SELECTORS;
import static io.airlift.compress.v3.bzip2.BZip2Constants.N_GROUPS;
import static io.airlift.compress.v3.bzip2.BZip2Constants.RUN_A;
import static io.airlift.compress.v3.bzip2.BZip2Constants.RUN_B;

/**
* An output stream that compresses into the BZip2 format (without the file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.bzip2;
package io.airlift.compress.v3.bzip2;

// forked from Apache Hadoop
final class Crc32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.deflate;
package io.airlift.compress.v3.deflate;

import io.airlift.compress.v2.Compressor;
import io.airlift.compress.v3.Compressor;

import java.lang.foreign.MemorySegment;
import java.util.zip.Deflater;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.deflate;
package io.airlift.compress.v3.deflate;

import io.airlift.compress.v2.Decompressor;
import io.airlift.compress.v2.MalformedInputException;
import io.airlift.compress.v3.Decompressor;
import io.airlift.compress.v3.MalformedInputException;

import java.lang.foreign.MemorySegment;
import java.nio.ByteBuffer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.deflate;
package io.airlift.compress.v3.deflate;

import io.airlift.compress.v2.hadoop.CodecAdapter;
import io.airlift.compress.v3.hadoop.CodecAdapter;

public class JdkDeflateCodec
extends CodecAdapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.deflate;
package io.airlift.compress.v3.deflate;

import io.airlift.compress.v2.hadoop.HadoopInputStream;
import io.airlift.compress.v3.hadoop.HadoopInputStream;

import java.io.EOFException;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.deflate;
package io.airlift.compress.v3.deflate;

import io.airlift.compress.v2.hadoop.HadoopOutputStream;
import io.airlift.compress.v3.hadoop.HadoopOutputStream;

import java.io.IOException;
import java.io.OutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.deflate;
package io.airlift.compress.v3.deflate;

import io.airlift.compress.v2.hadoop.HadoopInputStream;
import io.airlift.compress.v2.hadoop.HadoopOutputStream;
import io.airlift.compress.v2.hadoop.HadoopStreams;
import io.airlift.compress.v3.hadoop.HadoopInputStream;
import io.airlift.compress.v3.hadoop.HadoopOutputStream;
import io.airlift.compress.v3.hadoop.HadoopStreams;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.gzip;
package io.airlift.compress.v3.gzip;

import io.airlift.compress.v2.hadoop.CodecAdapter;
import io.airlift.compress.v3.hadoop.CodecAdapter;

public class JdkGzipCodec
extends CodecAdapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.gzip;
package io.airlift.compress.v3.gzip;

final class JdkGzipConstants
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.gzip;
package io.airlift.compress.v3.gzip;

import io.airlift.compress.v2.hadoop.HadoopInputStream;
import io.airlift.compress.v3.hadoop.HadoopInputStream;

import java.io.BufferedInputStream;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.gzip;
package io.airlift.compress.v3.gzip;

import io.airlift.compress.v2.hadoop.HadoopOutputStream;
import io.airlift.compress.v3.hadoop.HadoopOutputStream;

import java.io.IOException;
import java.io.OutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.gzip;
package io.airlift.compress.v3.gzip;

import io.airlift.compress.v2.hadoop.HadoopInputStream;
import io.airlift.compress.v2.hadoop.HadoopOutputStream;
import io.airlift.compress.v2.hadoop.HadoopStreams;
import io.airlift.compress.v3.hadoop.HadoopInputStream;
import io.airlift.compress.v3.hadoop.HadoopOutputStream;
import io.airlift.compress.v3.hadoop.HadoopStreams;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.hadoop;
package io.airlift.compress.v3.hadoop;

import io.airlift.compress.v2.hadoop.CompressionInputStreamAdapter.PositionSupplier;
import io.airlift.compress.v3.hadoop.CompressionInputStreamAdapter.PositionSupplier;
import org.apache.hadoop.conf.Configurable;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Seekable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.hadoop;
package io.airlift.compress.v3.hadoop;

import org.apache.hadoop.io.compress.CompressionInputStream;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.hadoop;
package io.airlift.compress.v3.hadoop;

import org.apache.hadoop.io.compress.CompressionOutputStream;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.hadoop;
package io.airlift.compress.v3.hadoop;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.hadoop;
package io.airlift.compress.v3.hadoop;

import java.io.IOException;
import java.io.OutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.airlift.compress.v2.hadoop;
package io.airlift.compress.v3.hadoop;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Loading