public class DeltaLongEncodingWriter extends Object implements CompressionFactory.LongEncodingWriter
| Constructor and Description | 
|---|
DeltaLongEncodingWriter(long base,
                       long delta)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
flush()
Flush the unwritten content to the current output. 
 | 
int | 
getBlockSize(int bytesPerBlock)
Get the number of values that can be encoded into each block for the given block size in bytes 
 | 
int | 
getNumBytes(int values)
Get the number of bytes required to encoding the given number of values 
 | 
int | 
metaSize()  | 
void | 
putMeta(ByteBuffer metaOut,
       CompressionStrategy strategy)
Output the header values of the associating encoding format to the given outputStream. 
 | 
void | 
setBuffer(ByteBuffer buffer)
Data will be written starting from current position of the buffer, and the position of the buffer will be
 updated as content is written. 
 | 
void | 
setOutputStream(WriteOutBytes output)  | 
void | 
write(long value)  | 
public void setBuffer(ByteBuffer buffer)
CompressionFactory.LongEncodingWritersetBuffer in interface CompressionFactory.LongEncodingWriterpublic void setOutputStream(WriteOutBytes output)
setOutputStream in interface CompressionFactory.LongEncodingWriterpublic void write(long value)
           throws IOException
write in interface CompressionFactory.LongEncodingWriterIOExceptionpublic void putMeta(ByteBuffer metaOut, CompressionStrategy strategy) throws IOException
CompressionFactory.LongEncodingWriterputMeta in interface CompressionFactory.LongEncodingWriterIOExceptionpublic int metaSize()
metaSize in interface CompressionFactory.LongEncodingWriterpublic int getBlockSize(int bytesPerBlock)
CompressionFactory.LongEncodingWritergetBlockSize in interface CompressionFactory.LongEncodingWriterpublic int getNumBytes(int values)
CompressionFactory.LongEncodingWritergetNumBytes in interface CompressionFactory.LongEncodingWriterpublic void flush()
           throws IOException
CompressionFactory.LongEncodingWriterflush in interface CompressionFactory.LongEncodingWriterIOExceptionCopyright © 2011–2018. All rights reserved.