|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||
java.lang.Objectorg.xerial.snappy.Snappy
public class Snappy
Snappy API for data compression/decompression
| コンストラクタの概要 | |
|---|---|
Snappy()
|
|
| メソッドの概要 | |
|---|---|
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 String |
getNativeLibraryVersion()
Get the native library version of the snappy |
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 a data of the given byte size. |
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 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. |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public Snappy()
| メソッドの詳細 |
|---|
public static String getNativeLibraryVersion()
public static byte[] compress(byte[] input)
throws SnappyException
compress(byte[], int, int, byte[], int) or
compress(ByteBuffer, ByteBuffer).
input - the input data
SnappyException
public static byte[] uncompress(byte[] input)
throws SnappyException
input -
SnappyException
public static int compress(ByteBuffer uncompressed,
ByteBuffer compressed)
throws SnappyException
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
SnappyException
public static int compress(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
throws SnappyException
input - inputOffset - inputLength - output - outputOffset -
SnappyException - when failed to access the input/output buffer
public static int uncompress(ByteBuffer compressed,
ByteBuffer uncompressed)
throws SnappyException
isValidCompressedBuffer(ByteBuffer) first.
compressed - buffer[pos() ... limit()) containing the input datauncompressed - output of the the uncompressed data. It uses buffer[pot()..]
SnappyException - when failed to uncompress the given input
SnappyError - when the input is not a direct buffer
public static int uncompress(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
throws SnappyException
isValidCompressedBuffer(byte[], int, int) first.
input - inputOffset - inputLength - output - outputOffset -
SnappyException
public static int uncompressedLength(ByteBuffer compressed)
throws SnappyException
compressed - input data [pos() ... limit())
SnappyException - 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 int uncompressedLength(byte[] input,
int offset,
int length)
throws SnappyException
input - offset - length -
SnappyException - when failed to uncompress the given input. The error code is
SnappyErrorCode.PARSING_ERRORpublic static int maxCompressedLength(int byteSize)
byteSize - byte size of the data to compress
public static boolean isValidCompressedBuffer(ByteBuffer compressed)
throws SnappyException
SnappyException
public static boolean isValidCompressedBuffer(byte[] input,
int offset,
int length)
throws SnappyException
SnappyException
|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||