Legend
| Class: RT.ArithmeticCoding.ArithmeticCodingWriter
SummaryImplements an arithmetic coding encoder. See Remarks.Remarks
The writer accepts a sequence of symbols as inputs via ArithmeticCodingWriter.WriteSymbol(
Symbols are permitted to have a frequency of zero, but it is illegal to attempt to encode a zero-frequency
symbol. The symbol context does not have to remain unchanged; the context may be modified arbitrarily between
calls to ArithmeticCodingWriter.WriteSymbol( This class does not offer any built-in means for the reader to detect the last symbol written. The caller must know when to stop calling ArithmeticCodingReader.ReadSymbol(). Where this cannot be deduced from context, you can dedicate an extra symbol (with a suitable frequency) to mark end of stream, or write total symbol count to the stream separately.
The reader and the writer support operation on a stream which has other data before and/or after the
arithmetic-coded section. The reader's ArithmeticCodingReader.Finalize( Arithmetic encoding uses fewer bits for more frequent symbols. The number of bits used per symbol is not necessarily an integer, and there is no pre-determined output bit pattern corresponding to a given symbol. Arithmetic coding is not data compression per se; it is an entropy coding algorithm. Arithmetic coding requires an accurate prediction of each symbol's probability to be supplied by the caller in order to be effective, and is only as good as the caller's modelling of the sequence of symbols being passed in. Constructors
Instance methods
|