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)
Compressor
compress
in interface Compressor
input
- The data to be compressed.public byte[] decompress(byte[] input)
Compressor
decompress
in interface Compressor
input
- A compressed byte array.Copyright © 1997-2017 Pivotal Software, Inc. All rights reserved.