ThoughtWorks.QRCode/ThoughtWorks/QRCode/Codec/QRCodeDecoder.cs
(开头部分) 15KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace ThoughtWorks.QRCode.Codec
{
using System;
using System.Collections;
using System.Text;
using ThoughtWorks.QRCode.Codec.Data;
using ThoughtWorks.QRCode.Codec.Ecc;
using ThoughtWorks.QRCode.Codec.Reader;
using ThoughtWorks.QRCode.Codec.Util;
using ThoughtWorks.QRCode.ExceptionHandler;
using ThoughtWorks.QRCode.Geom;
public class QRCodeDecoder
{
internal QRCodeSymbol qrCodeSymbol;
internal int numTryDecode = 0;
internal ArrayList results = ArrayList.Synchronized(new ArrayList(10));
internal ArrayList lastResults = ArrayList.Synchronized(new ArrayList(10));
internal static DebugCanvas canvas = new DebugCanvasAdapter();
internal QRCodeImageReader imageReader;
internal int numLastCorrections;
internal bool correctionSucceeded;
internal virtual int[] correctDataBlocks(int[] blocks)
{
ReedSolomon solomon;
int num8;
int num9;
int num10;
int num = 0;
int dataCapacity = this.qrCodeSymbol.DataCapacity;
int[] numArray = new int[dataCapacity];
int numErrorCollectionCode = this.qrCodeSymbol.NumErrorCollectionCode;
int numRSBlocks = this.qrCodeSymbol.NumRSBlocks;
int nPAR = numErrorCollectionCode / numRSBlocks;
if (numRSBlocks == 1)
{
solomon = new ReedSolomon(blocks, nPAR);
solomon.correct();
num += solomon.NumCorrectedErrors;
if (num > 0)
{
canvas.println(Convert.ToString(num) + " data errors corrected.");
}
else
{
canvas.println("No errors found.");
}
this.numLastCorrections = num;
this.correctionSucceeded = solomon.CorrectionSucceeded;
return blocks;
}
int num6 = dataCapacity % numRSBlocks;
if (num6 == 0)
{
int num7 = dataCapacity / numRSBlocks;
int[][] numArray2 = new int[numRSBlocks][];
for (num8 = 0; num8 < numRSBlocks; num8++)
{
numArray2[num8] = new int[num7];
后面还有 351 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。