decoder

package
v0.0.0-...-fc0e231 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2023 License: AGPL-3.0, AGPL-3.0-only Imports: 5 Imported by: 0

Documentation

Overview

Package decoder provides primitives used to decode the jbig2 data stream.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

Decoder is the structure used to decode JBIG2 encoded byte streams.

func Decode

func Decode(input []byte, parameters Parameters, globals *document.Globals) (*Decoder, error)

Decode prepares decoder for the jbig2 encoded 'input' data, with optional 'parameters' and optional Globally encoded data segments - 'globals'.

func (*Decoder) DecodeNextPage

func (d *Decoder) DecodeNextPage() ([]byte, error)

DecodeNextPage decodes next jbig2 encoded page and returns decoded byte stream

func (*Decoder) DecodePage

func (d *Decoder) DecodePage(pageNumber int) ([]byte, error)

DecodePage decodes jbig2 encoded page for provided 'pageNumber' in the document.

func (*Decoder) DecodePageImage

func (d *Decoder) DecodePageImage(pageNumber int) (image.Image, error)

DecodePageImage decodes page with 'pageNumber' from the document and stores it's result within go image.Image.

func (*Decoder) PageNumber

func (d *Decoder) PageNumber() (int, error)

PageNumber returns

type Parameters

type Parameters struct {
	UnpaddedData bool
	Color        bitmap.Color
}

Parameters are the parameters used by the jbig2 decoder.

Directories

Path Synopsis
Package arithmetic contains the jbig2 arithmetic decoder used to decode the jbig2 encoded segments.
Package arithmetic contains the jbig2 arithmetic decoder used to decode the jbig2 encoded segments.
Package huffman contains jbig2 huffman tables used to decode jbig2 encoded data segments.
Package huffman contains jbig2 huffman tables used to decode jbig2 encoded data segments.
Package mmr contains the jbig2 mmr decoder used to decode jbig2 encoded data segments.
Package mmr contains the jbig2 mmr decoder used to decode jbig2 encoded data segments.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL