com.bigdata.io.compression
Interface IUnicodeCompressor

All Known Implementing Classes:
BOCU1Compressor, NoCompressor, SCSUCompressor

public interface IUnicodeCompressor

Unicode compression / decompression api.

Version:
$Id: IUnicodeCompressor.java 4582 2011-05-31 19:12:53Z thompsonbry $
Author:
Bryan Thompson

Method Summary
 int decode(InputStream in, Appendable out)
          Decode a Unicode character sequence from the input stream.
 int encode(CharSequence in, OutputStream out)
          Encode a Unicode character sequence.
 

Method Detail

encode

int encode(CharSequence in,
           OutputStream out)
Encode a Unicode character sequence. The run length of the encoded sequence is NOT marked in the output.

Parameters:
in - The Unicode data.
out - Where to write the encoded data.
Returns:
The #of bytes written onto the output stream

decode

int decode(InputStream in,
           Appendable out)
Decode a Unicode character sequence from the input stream. The run length of the encoded sequence is NOT marked in the input, so the caller must provide a view consisting of exactly the bytes to be decoded.

Parameters:
in - The encoded data.
out - The decoded data (Unicode characters) are appended to this object.
Returns:
The #of bytes that were consumed.


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.