public class SnappyCompressorInputStreamextends CompressorInputStream
This implementation uses an internal buffer in order to handle the back-references that are at the heart of the LZ77 algorithm. The size of the buffer must be at least as big as the biggest offset used in the compressed stream. The current version of the Snappy algorithm as defined by Google works on 32k blocks and doesn't contain offsets bigger than 32k which is the default block size used by this class.
|Modifier and Type||Field and Description|
Default block size
|Constructor and Description|
Constructor using the default buffer size of 32k.
Constructor using a configurable buffer size.
|Modifier and Type||Method and Description|
Get the uncompressed size of the stream
count, count, getBytesRead, getCount, pushedBackBytes
public SnappyCompressorInputStream(InputStream is) throws IOException
is- An InputStream to read compressed data from
IOException- if reading fails
public void close() throws IOException
public int read(byte b, int off, int len) throws IOException
public int getSize()
Copyright © 2016 The Apache Software Foundation. All rights reserved.