Formula to calculate the max data capacity for QR codes?

感情迁移 提交于 2019-12-10 21:43:37

问题


I've seen in several places on the web (e.g. here and here and here) a table showing the number of characters each type of QR Code (1 to 40) can display depending on character type and EC level.

What I haven't been able to find or work out is the formula used to generate this table?

i.e. QR_Type & EC_Level & Character_Type => Max character length

I want to use this formula to work out the lowest QR type that can be used to display an input string, given a chosen EC level and by detecting the character set and string length.


回答1:


There is no formula for it. While it follows a general trend of course which you could approximate with a simple linear function, the exact cutoffs vary a bit due to roundings in several aspects -- number of codewords in a version, number of interleaves blocks, number of EC/data blocks. If you need an exact answer you need a table.



来源:https://stackoverflow.com/questions/14908842/formula-to-calculate-the-max-data-capacity-for-qr-codes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!