pdf417

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(data string, securityLevel byte, targetRowHeight, targetColumns int) (image.Image, error)

Encodes the given data as PDF417 barcode. securityLevel should be between 0 and 8. The higher the number, the more additional error-correction codes are added.

Types

type BitList

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

BitList is a list that contains bits

func NewBitList

func NewBitList(capacity int) *BitList

NewBitList returns a new BitList with the given length all bits are initialize with false

func (*BitList) AddBit

func (bl *BitList) AddBit(bits ...bool)

AddBit appends the given bits to the end of the list

func (*BitList) AddBits

func (bl *BitList) AddBits(b int, count byte)

AddBits appends the last (LSB) 'count' bits of 'b' the the end of the list

func (*BitList) AddByte

func (bl *BitList) AddByte(b byte)

AddByte appends all 8 bits of the given byte to the end of the list

func (*BitList) GetBit

func (bl *BitList) GetBit(index int) bool

GetBit returns the bit at the given index

func (*BitList) GetBytes

func (bl *BitList) GetBytes() []byte

GetBytes returns all bits of the BitList as a []byte

func (*BitList) IterateBytes

func (bl *BitList) IterateBytes() <-chan byte

IterateBytes iterates through all bytes contained in the BitList

func (*BitList) Len

func (bl *BitList) Len() int

Len returns the number of contained bits

func (*BitList) SetBit

func (bl *BitList) SetBit(index int, value bool)

SetBit sets the bit at the given index to the given value

Jump to

Keyboard shortcuts

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