What does this JB code really want?
$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-l8
if ($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)
);
------Solution--------------------
Do not understand the principle of two-dimensional code, see the code can read it?
Numeric mode digital code, from 0 to 9. If the number of digits that need to be encoded is not a multiple of 3, then the last remaining 1 or 2 digits will be converted to 4 or 7bits, then each of the other 3 digits will be 10,12,14bits corresponding to your Estimatebitsmodenum
Number of digits encoded under different version:
correspond to your Lengthindicator
I don't understand, help you find the information: Http://coolshell.cn/articles/10590.html#jtss-tsina