classes-Com-Tecnick-Barcode-Type-Square-QrCode-ByteStream

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

ByteStream extends Encode

in package

Com\Tecnick\Barcode\Type\Square\QrCode\ByteStream

Tags
since
2015-02-21
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2010-2024 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-barcode
phpstan-import-type

Item from \Com\Tecnick\Barcode\Type\Square\QrCode\Estimate

Table of Contents

Properties

$version  : int
QR code version.

Methods

__construct()  : mixed
Initialize
appendNewInputItem()  : array<int, Item>
Append data to an input object.
encodeBitStream()  : Item
Encode BitStream
estimateBitsMode8()  : int
estimateBitsMode8
estimateBitsModeAn()  : int
estimateBitsModeAn
estimateBitsModeKanji()  : int
estimateBitsModeKanji
estimateBitsModeNum()  : int
estimateBitsModeNum
estimateVersion()  : int
Estimate version
getByteStream()  : array<int, int>
Pack all bit streams padding bits into a byte array
getEncodingMode()  : int
Get the encoding mode to use
getLengthIndicator()  : int
Return the size of length indicator for the mode and version
isAlphanumericAt()  : bool
Return true if the character at specified position is an alphanumeric character
isDigitAt()  : bool
Return true if the character at specified position is a number
lookAnTable()  : int
Look up the alphabet-numeric conversion table (see JIS X0510:2004, pp.19)

Properties

$version

QR code version.

public int $version = 0

The Size of QRcode is defined as version. Version is an integer value from 1 to 40. Version 1 is 2121 matrix. And 4 modules increases whenever 1 version increases. So version 40 is 177177 matrix.

Methods

__construct()

Initialize

public __construct(int $hint, int $version, int $level) : mixed
Parameters
$hint : int

Encoding mode

$version : int

Code version

$level : int

Error Correction Level

appendNewInputItem()

Append data to an input object.

public appendNewInputItem(array<int, Item$items, int $mode, int $size, array<int, string> $data) : array<int, Item>

The data is copied and appended to the input object.

Parameters
$items : array<int, Item>

Input items

$mode : int

Encoding mode.

$size : int

Size of data (byte).

$data : array<int, string>

Array of input data.

Return values
array<int, Item>

items

encodeBitStream()

Encode BitStream

public encodeBitStream(Item $inputitem, int $version) : Item
Parameters
$inputitem : Item

Input item

$version : int

Code version

Return values
Item

estimateBitsMode8()

estimateBitsMode8

public estimateBitsMode8(int $size) : int
Parameters
$size : int
Return values
int

number of bits

estimateBitsModeAn()

estimateBitsModeAn

public estimateBitsModeAn(int $size) : int
Parameters
$size : int
Return values
int

number of bits

estimateBitsModeKanji()

estimateBitsModeKanji

public estimateBitsModeKanji(int $size) : int
Parameters
$size : int
Return values
int

number of bits

estimateBitsModeNum()

estimateBitsModeNum

public estimateBitsModeNum(int $size) : int
Parameters
$size : int
Return values
int

number of bits

estimateVersion()

Estimate version

public estimateVersion(array<int, Item$items, int $level) : int
Parameters
$items : array<int, Item>

Items

$level : int

Error correction level

Return values
int

version

getByteStream()

Pack all bit streams padding bits into a byte array

public getByteStream(array<int, Item$items) : array<int, int>
Parameters
$items : array<int, Item>

Items

Return values
array<int, int>

padded merged byte stream

getEncodingMode()

Get the encoding mode to use

public getEncodingMode(string $data, int $pos) : int
Parameters
$data : string

Data

$pos : int

Position

Return values
int

mode

getLengthIndicator()

Return the size of length indicator for the mode and version

public getLengthIndicator(int $mode, int $version) : int
Parameters
$mode : int

Encoding mode

$version : int

Version

Return values
int

the size of the appropriate length indicator (bits).

isAlphanumericAt()

Return true if the character at specified position is an alphanumeric character

public isAlphanumericAt(string $str, int $pos) : bool
Parameters
$str : string

Data

$pos : int

Character position

Return values
bool

isDigitAt()

Return true if the character at specified position is a number

public isDigitAt(string $str, int $pos) : bool
Parameters
$str : string

Data

$pos : int

Character position

Return values
bool

lookAnTable()

Look up the alphabet-numeric conversion table (see JIS X0510:2004, pp.19)

public lookAnTable(int $chr) : int
Parameters
$chr : int

Character value

Return values
int
On this page
 

© 2004-2024 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy