ClassLibraryWeiBao/QR二维码/VersionDetail.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace Gma.QrCodeNet.Encoding
{
	public struct VersionDetail
	{
		internal int Version { get; private set; }
		internal int NumTotalBytes { get; private set; }
		internal int NumDataBytes { get; private set; }
		internal int NumECBlocks { get; private set; }
		
		internal VersionDetail(int version, int numTotalBytes, int numDataBytes, int numECBlocks)
			: this()
		{
			this.Version = version;
			this.NumTotalBytes = numTotalBytes;
			this.NumDataBytes = numDataBytes;
			this.NumECBlocks = numECBlocks;
		}
		
		/// <summary>
		/// Width for current version
		/// </summary>
		internal int MatrixWidth
		{
			get
			{
				return Width(this.Version);
			}
		}
		
		internal static int Width(int version)
		{
			return 17 + 4 * version;
		}
		
		/// <summary>
		/// number of Error correction blocks for group 1
		/// </summary>
		internal int ECBlockGroup1
		{
			get
			{
				return this.NumECBlocks - this.ECBlockGroup2;
			}
		}
		
		/// <summary>
		/// Number of error correction blocks for group 2
		/// </summary>
		internal int ECBlockGroup2
		{
			get
			{
				return this.NumTotalBytes % this.NumECBlocks;
			}
		}
		
		/// <summary>
		/// Number of data bytes per block for group 1
		/// </summary>
		internal int NumDataBytesGroup1
后面还有 36 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。