|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||
java.lang.Objectorg.xerial.snappy.Snappy
public class Snappy
Snappy API for data compression/decompression
| コンストラクタの概要 | |
|---|---|
Snappy()
|
|
| メソッドの概要 | |
|---|---|
static void |
arrayCopy(Object src,
int offset,
int byteLength,
Object dest,
int dest_offset)
Copy bytes from source to destination |
static byte[] |
compress(byte[] input)
High-level API for compressing the input byte array. |
static int |
compress(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
Compress the input buffer content in [inputOffset, ...inputOffset+inputLength) then output to the specified output buffer. |
static int |
compress(ByteBuffer uncompressed,
ByteBuffer compressed)
Compress the content in the given input buffer. |
static byte[] |
compress(char[] input)
|
static byte[] |
compress(double[] input)
|
static byte[] |
compress(float[] input)
|
static byte[] |
compress(int[] input)
|
static byte[] |
compress(long[] input)
|
static byte[] |
compress(short[] input)
|
static byte[] |
compress(String s)
|
static byte[] |
compress(String s,
String encoding)
|
static String |
getNativeLibraryVersion()
Get the native library version of the snappy |
static boolean |
isValidCompressedBuffer(byte[] input)
Returns true iff the contents of compressed buffer [offset, offset+length) can be uncompressed successfully. |
static boolean |
isValidCompressedBuffer(byte[] input,
int offset,
int length)
Returns true iff the contents of compressed buffer [offset, offset+length) can be uncompressed successfully. |
static boolean |
isValidCompressedBuffer(ByteBuffer compressed)
Returns true iff the contents of compressed buffer [pos() ... limit()) can be uncompressed successfully. |
static int |
maxCompressedLength(int byteSize)
Get the maximum byte size needed for compressing data of the given byte size. |
static byte[] |
rawCompress(Object data,
int byteSize)
Compress the input data and produce a byte array of the uncompressed data |
static int |
rawCompress(Object input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
Compress the input buffer [offset,... |
static int |
rawUncompress(byte[] input,
int inputOffset,
int inputLength,
Object output,
int outputOffset)
Uncompress the content in the input buffer. |
static byte[] |
uncompress(byte[] input)
High-level API for uncompressing the input byte array. |
static int |
uncompress(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
Uncompress the content in the input buffer. |
static int |
uncompress(ByteBuffer compressed,
ByteBuffer uncompressed)
Uncompress the content in the input buffer. |
static char[] |
uncompressCharArray(byte[] input)
|
static char[] |
uncompressCharArray(byte[] input,
int offset,
int length)
|
static double[] |
uncompressDoubleArray(byte[] input)
|
static int |
uncompressedLength(byte[] input)
Get the uncompressed byte size of the given compressed input. |
static int |
uncompressedLength(byte[] input,
int offset,
int length)
Get the uncompressed byte size of the given compressed input. |
static int |
uncompressedLength(ByteBuffer compressed)
Get the uncompressed byte size of the given compressed input. |
static float[] |
uncompressFloatArray(byte[] input)
|
static float[] |
uncompressFloatArray(byte[] input,
int offset,
int length)
|
static int[] |
uncompressIntArray(byte[] input)
|
static int[] |
uncompressIntArray(byte[] input,
int offset,
int length)
|
static long[] |
uncompressLongArray(byte[] input)
|
static long[] |
uncompressLongArray(byte[] input,
int offset,
int length)
|
static short[] |
uncompressShortArray(byte[] input)
|
static short[] |
uncompressShortArray(byte[] input,
int offset,
int length)
|
static String |
uncompressString(byte[] input)
|
static String |
uncompressString(byte[] input,
int offset,
int length)
|
static String |
uncompressString(byte[] input,
int offset,
int length,
String encoding)
|
static String |
uncompressString(byte[] input,
String encoding)
|
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public Snappy()
| メソッドの詳細 |
|---|
public static void arrayCopy(Object src,
int offset,
int byteLength,
Object dest,
int dest_offset)
throws IOException
src - pointer to the source arrayoffset - byte offset in the source arraybyteLength - the number of bytes to copydest - pointer to the destination arraydest_offset - byte offset in the destination array
IOException
public static byte[] compress(byte[] input)
throws IOException
compress(byte[], int, int, byte[], int) or
compress(ByteBuffer, ByteBuffer).
input - the input data
IOException
public static int compress(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
throws IOException
input - inputOffset - inputLength - output - outputOffset -
IOException - when failed to access the input/output buffer
public static int compress(ByteBuffer uncompressed,
ByteBuffer compressed)
throws IOException
uncompressed - buffer[pos() ... limit()) containing the input datacompressed - output of the compressed data. Uses range [pos()..].
SnappyError - when the input is not a direct buffer
IOExceptionpublic static byte[] compress(char[] input)
public static byte[] compress(double[] input)
public static byte[] compress(float[] input)
public static byte[] compress(int[] input)
public static byte[] compress(long[] input)
public static byte[] compress(short[] input)
public static byte[] compress(String s)
throws IOException
IOException
public static byte[] compress(String s,
String encoding)
throws UnsupportedEncodingException,
IOException
UnsupportedEncodingException
IOExceptionpublic static String getNativeLibraryVersion()
public static boolean isValidCompressedBuffer(byte[] input,
int offset,
int length)
throws IOException
IOException
public static boolean isValidCompressedBuffer(byte[] input)
throws IOException
IOException
public static boolean isValidCompressedBuffer(ByteBuffer compressed)
throws IOException
IOExceptionpublic static int maxCompressedLength(int byteSize)
byteSize - byte size of the data to compress
public static byte[] rawCompress(Object data,
int byteSize)
data - input array. The input MUST be an array typebyteSize - the input byte size
public static int rawCompress(Object input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
throws IOException
input - input array. This MUST be primitive array typeinputOffset - byte offset at the output arrayinputLength - byte length of the input dataoutput - output array. This MUST be primitive array typeoutputOffset - byte offset at the output array
IOException
public static int rawUncompress(byte[] input,
int inputOffset,
int inputLength,
Object output,
int outputOffset)
throws IOException
isValidCompressedBuffer(byte[], int, int) first.
input - input byte arrayinputOffset - byte offsetinputLength - byte length of the input dataoutput - output buffer, MUST be a primitive type arrayoutputOffset - byte offset
IOException
public static byte[] uncompress(byte[] input)
throws IOException
input -
IOException
public static int uncompress(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
throws IOException
isValidCompressedBuffer(byte[], int, int) first.
input - inputOffset - inputLength - output - outputOffset -
IOException
public static int uncompress(ByteBuffer compressed,
ByteBuffer uncompressed)
throws IOException
isValidCompressedBuffer(ByteBuffer) first.
compressed - buffer[pos() ... limit()) containing the input datauncompressed - output of the the uncompressed data. It uses buffer[pot()..]
IOException - when failed to uncompress the given input
SnappyError - when the input is not a direct buffer
public static char[] uncompressCharArray(byte[] input)
throws IOException
IOException
public static char[] uncompressCharArray(byte[] input,
int offset,
int length)
throws IOException
IOException
public static double[] uncompressDoubleArray(byte[] input)
throws IOException
IOException
public static int uncompressedLength(byte[] input)
throws IOException
input -
IOException - when failed to uncompress the given input. The error code is
SnappyErrorCode.PARSING_ERROR
public static int uncompressedLength(byte[] input,
int offset,
int length)
throws IOException
input - offset - length -
IOException - when failed to uncompress the given input. The error code is
SnappyErrorCode.PARSING_ERROR
public static int uncompressedLength(ByteBuffer compressed)
throws IOException
compressed - input data [pos() ... limit())
IOException - when failed to uncompress the given input. The error code is
SnappyErrorCode.PARSING_ERROR
SnappyError - when the input is not a direct buffer
public static float[] uncompressFloatArray(byte[] input)
throws IOException
IOException
public static float[] uncompressFloatArray(byte[] input,
int offset,
int length)
throws IOException
IOException
public static int[] uncompressIntArray(byte[] input)
throws IOException
IOException
public static int[] uncompressIntArray(byte[] input,
int offset,
int length)
throws IOException
IOException
public static long[] uncompressLongArray(byte[] input)
throws IOException
IOException
public static long[] uncompressLongArray(byte[] input,
int offset,
int length)
throws IOException
IOException
public static short[] uncompressShortArray(byte[] input)
throws IOException
IOException
public static short[] uncompressShortArray(byte[] input,
int offset,
int length)
throws IOException
IOException
public static String uncompressString(byte[] input)
throws IOException
IOException
public static String uncompressString(byte[] input,
int offset,
int length)
throws IOException
IOException
public static String uncompressString(byte[] input,
int offset,
int length,
String encoding)
throws IOException,
UnsupportedEncodingException
IOException
UnsupportedEncodingException
public static String uncompressString(byte[] input,
String encoding)
throws IOException,
UnsupportedEncodingException
IOException
UnsupportedEncodingException
|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||