Documentation ¶
Overview ¶
Package arithmetic provides jbig2 arithmetic encoder definitions.
Index ¶
- type Class
- type Encoder
- func (e *Encoder) DataSize() int
- func (e *Encoder) EncodeBitmap(bm *bitmap.Bitmap, duplicateLineRemoval bool) error
- func (e *Encoder) EncodeIAID(symbolCodeLength, value int) (err error)
- func (e *Encoder) EncodeInteger(proc Class, value int) (err error)
- func (e *Encoder) EncodeOOB(proc Class) (err error)
- func (e *Encoder) Final()
- func (e *Encoder) Flush()
- func (e *Encoder) Init()
- func (e *Encoder) Refine(iTemp, iTarget *bitmap.Bitmap, ox, oy int) error
- func (e *Encoder) Reset()
- func (e *Encoder) WriteTo(w io.Writer) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Class ¶
type Class int
Class is the arithmetic encoding context class.
const ( // IAAI used to decode number of symbol instances in an aggregation. IAAI Class = iota // IADH used to decode difference in height between two height classes. IADH // IADS used to decode the S coordinate of the second and subsequent // symbol instances in a strip. IADS // IADT used to decode the T coordinate of the second and subsequent // symbol instances in a strip. IADT // IADW used to decode the difference in width between two symbols in // a height class IADW // IAEX used to decode export flags. IAEX // IAFS used to decode the S coordinate of the first symbol instance // in a strip. IAFS // IAIT used to decode the T coordinate of the symbol instances in a strip. IAIT // IARDH used to decode the delta height of symbol instance refinements. IARDH // IARDW used to decode the delta width of symbol instance refinements. IARDW // IARDX used to decode the delta X position of symbol instance refinements. IARDX // IARDY used to decode the delta Y position of symbol instance refinements. IARDY // IARI used to decode the Ri bit of symbol instances. IARI )
Enumerated definitions for the encoding classes.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder is the jbig2 arithmetic encoder context.
func (*Encoder) EncodeBitmap ¶
EncodeBitmap encodes packed data used for the 1bpp packed format image.
func (*Encoder) EncodeIAID ¶
EncodeIAID encodes the integer ID 'value'. The symbol code length is the binary length of the value.
func (*Encoder) EncodeInteger ¶
EncodeInteger encodes the integer 'value' for the given class 'proc'.
func (*Encoder) Final ¶
func (e *Encoder) Final()
Final flush any remaining arithmetic encoder context to the output
Click to show internal directories.
Click to hide internal directories.