What exactly does this JB code do?
$ln = $this->lengthIndicator($this->QR_MODE_NM, $this->version);$dif = $this->estimateBitsModeNum($run) + 4 + $ln+ $this->estimateBitsMode8(1) // + 4 + l8- $this->estimateBitsMode8($run + 1); // - 4 - l8if ($dif > 0) {return $this->eat8();}function estimateBitsModeNum($size) {$w = (int)$size / 3;$bits = $w * 10;switch($size - $w * 3) {case 1: {$bits += 4;break;}case 2: {$bits += 7;break;}default: {break;}}return $bits;}function estimateBitsMode8($size) {return $size * 8;}function lengthIndicator($mode, $version) {if ($mode == $this->QR_MODE_ST) {return 0;}if ($version <= 9) {$l = 0;} elseif ($version <= 26) {$l = 1;} else {$l = 2;}return $this->lengthTableBits[$mode][$l];}$lengthTableBits = array(array(10, 12, 14),array( 9, 11, 13),array( 8, 16, 16),array( 8, 10, 12));
Reply to discussion (solution)
Who knows what you're doing?
The code is incomplete, so I cannot see what the JB code is trying to do.
What are you doing? answer points!
Come on, check out.
I cannot understand it!
Generate a QR code.
Generate a QR code.
I have met experts. Explanations
This code is too short. it seems to be a QR code.
This code is too short. it seems to be a QR code.
Why eat12, 14.
I don't know how the QR code works. can I understand the code?
Numeric mode Numeric encoding, from 0 to 9. If the number of numbers to be encoded is not a multiple of 3, the remaining 1 or 2 digits will be converted to 4 or 7 bits, the other three digits are compiled into 10, 12, and 14 bits corresponding to your estimateBitsModeNum.
Number of digits encoded in different versions:
Corresponding to your lengthIndicator
I do not understand, help you find the information: http://coolshell.cn/articles/10590.html#jtss-tsina