Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
315 views
in Technique[技术] by (71.8m points)

java - 有什么算法可以将大约40k个字符减少为2-3k个字符?(Is there any algorithm to reduce around 40k characters into 2-3k characters?)

I have been doing this project related QR code and I'm stuck at this stage where I have to generate a QR code containing information about the other 10K QR codes(batch).

(我一直在做与该项目相关的QR码,在这个阶段,我不得不生成一个QR码,其中包含有关其他10K QR码(批次)的信息。)

I thought of taking the first 4 characters in the hash-code of each QR code(in 10k batch) so that the generated QR code would be unique every time (even if a couple 100s QR code changes in the 10K batch).

(我想到了将每个QR码的哈希码中的前4个字符(以10k批处理)取为每一次生成的QR码都是唯一的(即使在10k批次中有几对100s的QR码发生了变化)。)

QR Code Data Capacity

(QR码数据容量)

Numeric Only Max.

(仅数字最大值)

7089 characters

(7089个字符)

Alphanumeric Max.

(字母数字最大值)

4296 characters

(4296个字符)

Binary (8 Bits) Max.

(二进制(最大8位))

2953 characters

(2953个字符)

So are there any algorithms or techniques where I can convert a huge string into a small string that is unique every time??

(那么,有没有什么算法或技术可以将巨大的字符串转换为每次都是唯一的小字符串?)

Thanks in advance.

(提前致谢。)

  ask by naveen jayanna translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...