Skip to content

Commit

Permalink
Move to v2 package
Browse files Browse the repository at this point in the history
  • Loading branch information
dain committed Jul 2, 2024
1 parent 818baa5 commit 3b4a4b1
Show file tree
Hide file tree
Showing 188 changed files with 728 additions and 728 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.Compressor`
and `io.airlift.compress.Decompressor` classes. Block compression is the simplest form of
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
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
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;
package io.airlift.compress.v2;

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;
package io.airlift.compress.v2;

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;
package io.airlift.compress.v2;

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;
package io.airlift.compress.v2;

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.bzip2;
package io.airlift.compress.v2.bzip2;

import io.airlift.compress.hadoop.CodecAdapter;
import io.airlift.compress.v2.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 @@
* <keiron@aftexsw.com> to whom the Ant project is very grateful for his
* great code.
*/
package io.airlift.compress.bzip2;
package io.airlift.compress.v2.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.bzip2;
package io.airlift.compress.v2.bzip2;

import io.airlift.compress.hadoop.HadoopInputStream;
import io.airlift.compress.v2.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.bzip2;
package io.airlift.compress.v2.bzip2;

import io.airlift.compress.hadoop.HadoopOutputStream;
import io.airlift.compress.v2.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.bzip2;
package io.airlift.compress.v2.bzip2;

import io.airlift.compress.hadoop.HadoopInputStream;
import io.airlift.compress.hadoop.HadoopOutputStream;
import io.airlift.compress.hadoop.HadoopStreams;
import io.airlift.compress.v2.hadoop.HadoopInputStream;
import io.airlift.compress.v2.hadoop.HadoopOutputStream;
import io.airlift.compress.v2.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 @@
* <keiron@aftexsw.com> to whom the Ant project is very grateful for his
* great code.
*/
package io.airlift.compress.bzip2;
package io.airlift.compress.v2.bzip2;

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

import static io.airlift.compress.bzip2.BZip2Constants.G_SIZE;
import static io.airlift.compress.bzip2.BZip2Constants.MAX_ALPHA_SIZE;
import static io.airlift.compress.bzip2.BZip2Constants.MAX_SELECTORS;
import static io.airlift.compress.bzip2.BZip2Constants.N_GROUPS;
import static io.airlift.compress.bzip2.BZip2Constants.RUN_A;
import static io.airlift.compress.bzip2.BZip2Constants.RUN_B;
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;

/**
* 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.bzip2;
package io.airlift.compress.v2.bzip2;

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

import static io.airlift.compress.bzip2.BZip2Constants.G_SIZE;
import static io.airlift.compress.bzip2.BZip2Constants.MAX_ALPHA_SIZE;
import static io.airlift.compress.bzip2.BZip2Constants.MAX_SELECTORS;
import static io.airlift.compress.bzip2.BZip2Constants.N_GROUPS;
import static io.airlift.compress.bzip2.BZip2Constants.RUN_A;
import static io.airlift.compress.bzip2.BZip2Constants.RUN_B;
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;

/**
* 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.bzip2;
package io.airlift.compress.v2.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.deflate;
package io.airlift.compress.v2.deflate;

import io.airlift.compress.Compressor;
import io.airlift.compress.v2.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.deflate;
package io.airlift.compress.v2.deflate;

import io.airlift.compress.Decompressor;
import io.airlift.compress.MalformedInputException;
import io.airlift.compress.v2.Decompressor;
import io.airlift.compress.v2.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.deflate;
package io.airlift.compress.v2.deflate;

import io.airlift.compress.hadoop.CodecAdapter;
import io.airlift.compress.v2.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.deflate;
package io.airlift.compress.v2.deflate;

import io.airlift.compress.hadoop.HadoopInputStream;
import io.airlift.compress.v2.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.deflate;
package io.airlift.compress.v2.deflate;

import io.airlift.compress.hadoop.HadoopOutputStream;
import io.airlift.compress.v2.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.deflate;
package io.airlift.compress.v2.deflate;

import io.airlift.compress.hadoop.HadoopInputStream;
import io.airlift.compress.hadoop.HadoopOutputStream;
import io.airlift.compress.hadoop.HadoopStreams;
import io.airlift.compress.v2.hadoop.HadoopInputStream;
import io.airlift.compress.v2.hadoop.HadoopOutputStream;
import io.airlift.compress.v2.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.gzip;
package io.airlift.compress.v2.gzip;

import io.airlift.compress.hadoop.CodecAdapter;
import io.airlift.compress.v2.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.gzip;
package io.airlift.compress.v2.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.gzip;
package io.airlift.compress.v2.gzip;

import io.airlift.compress.hadoop.HadoopInputStream;
import io.airlift.compress.v2.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.gzip;
package io.airlift.compress.v2.gzip;

import io.airlift.compress.hadoop.HadoopOutputStream;
import io.airlift.compress.v2.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.gzip;
package io.airlift.compress.v2.gzip;

import io.airlift.compress.hadoop.HadoopInputStream;
import io.airlift.compress.hadoop.HadoopOutputStream;
import io.airlift.compress.hadoop.HadoopStreams;
import io.airlift.compress.v2.hadoop.HadoopInputStream;
import io.airlift.compress.v2.hadoop.HadoopOutputStream;
import io.airlift.compress.v2.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.hadoop;
package io.airlift.compress.v2.hadoop;

import io.airlift.compress.hadoop.CompressionInputStreamAdapter.PositionSupplier;
import io.airlift.compress.v2.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.hadoop;
package io.airlift.compress.v2.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.hadoop;
package io.airlift.compress.v2.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.hadoop;
package io.airlift.compress.v2.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.hadoop;
package io.airlift.compress.v2.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.hadoop;
package io.airlift.compress.v2.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.internal;
package io.airlift.compress.v2.internal;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -155,7 +155,7 @@ private static ValueLayout getMemoryLayout(Class<?> type)
public static SymbolLookup loadLibrary(String name)
throws LinkageError
{
if (System.getProperty("io.airlift.compress.disable-native") != null) {
if (System.getProperty("io.airlift.compress.v2.disable-native") != null) {
throw new LinkageError("Native library loading is disabled");
}

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.internal;
package io.airlift.compress.v2.internal;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;
Expand Down
Loading

0 comments on commit 3b4a4b1

Please sign in to comment.