Documentation ¶
Overview ¶
Package arithmetic contains the jbig2 arithmetic decoder used to decode the jbig2 encoded segments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct { // ContextSize is the current decoder context size ContextSize []uint32 ReferedToContextSize []uint32 // contains filtered or unexported fields }
Decoder is the arithmetic Decoder structure, used to decode the jbig2 Segments.
func (*Decoder) DecodeBit ¶
func (d *Decoder) DecodeBit(stats *DecoderStats) (int, error)
DecodeBit decodes a single bit using provided decoder stats.
func (*Decoder) DecodeIAID ¶
func (d *Decoder) DecodeIAID(codeLen uint64, stats *DecoderStats) (int64, error)
DecodeIAID decodes the IAID procedure, Annex A.3.
type DecoderStats ¶
type DecoderStats struct {
// contains filtered or unexported fields
}
DecoderStats is the structure that contains arithmetic decode context.
func NewStats ¶
func NewStats(contextSize int32, index int32) *DecoderStats
NewStats creates new DecoderStats of size 'contextSize'.
func (*DecoderStats) Copy ¶
func (d *DecoderStats) Copy() *DecoderStats
Copy copies the DecoderStats.
func (*DecoderStats) Overwrite ¶
func (d *DecoderStats) Overwrite(dNew *DecoderStats)
Overwrite overwrites the codingContextTable from new DecoderStats 'dNew'.
func (*DecoderStats) SetIndex ¶
func (d *DecoderStats) SetIndex(index int32)
SetIndex sets current decoder stats 'index'.
func (*DecoderStats) String ¶
func (d *DecoderStats) String() string
String implements Stringer interface.
Click to show internal directories.
Click to hide internal directories.