stream

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	// Decode decodes src and writes to dst. Name is the PDF filter name (e.g. "FlateDecode").
	Decode(dst io.Writer, src io.Reader, name string) error
	// Encode encodes src and writes to dst.
	Encode(dst io.Writer, src io.Reader, name string) error
}

Filter decodes or encodes stream data (e.g. FlateDecode).

type FilterRegistry

type FilterRegistry interface {
	// Get returns the filter for the given name, or nil if not supported.
	Get(name string) Filter
	// Register adds a filter for the given name.
	Register(name string, f Filter)
}

FilterRegistry maps PDF filter names to Filter implementations.

type Registry

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

Registry is a mutable map of filter name to Filter. It implements FilterRegistry.

func NewRegistry

func NewRegistry() *Registry

NewRegistry returns an empty filter registry. Callers should register filters (e.g. FlateDecode).

func (*Registry) Get

func (r *Registry) Get(name string) Filter

Get returns the filter for the given name, or nil if not registered.

func (*Registry) Register

func (r *Registry) Register(name string, f Filter)

Register adds a filter for the given name.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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