public final class SnappyCompressor extends Object implements Compressor, Serializable
Compressor for Google's Snappy compression
codec. Utilizes the xerial java-snappy wrapper.| Constructor and Description |
|---|
SnappyCompressor()
Create a new instance of the SnappyCompressor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compress(byte[] input)
Compresses the input byte array.
|
byte[] |
decompress(byte[] input)
Decompresses a compressed byte array.
|
boolean |
equals(Object other) |
static SnappyCompressor |
getDefaultInstance()
Get the single, default instance of the SnappyCompressor.
|
int |
hashCode() |
public SnappyCompressor()
IllegaltStateException - when the Snappy native library is unavailablepublic static final SnappyCompressor getDefaultInstance()
public byte[] compress(byte[] input)
Compressorcompress in interface Compressorinput - The data to be compressed.public byte[] decompress(byte[] input)
Compressordecompress in interface Compressorinput - A compressed byte array.Copyright © 1997-2017 Pivotal Software, Inc. All rights reserved.