|

分享源码
界面截图: |
- |
是否带模块: |
- |
备注说明: |
- |
应该之前从论坛里找来或者精易模块提取的,随去随用。
变量名 | 类 型 | 静态 | 数组 | 备 注 | 余数 | | | | 临时 | 字节型 | | 3 | 变量 | | | | 集合 | 字节集 | | | 长度 | 整数型 | | | 字符 | 字节集 | | | i | | | |
长度 = 取字节集长度 (待编码数据 ) 如果真 (长度 < 1 ) 返回 (“”)余数 = 长度 % 3 如果真 (余数 > 0 ) 待编码数据 = 待编码数据 + 取空白字节集 (3 - 余数 )长度 = 取字节集长度 (待编码数据)字符 = 取空白字节集 (长度 × 4 ÷ 3 )i = 1 集合 = 到字节集 (“ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/”) 变量循环首 (1, 长度, 3, 变量 ) 临时 [1 ] = 待编码数据 [变量 ] 临时 [2 ] = 待编码数据 [变量 + 1 ] 临时 [3 ] = 待编码数据 [变量 + 2 ] 字符 [i ] = 集合 [右移 (临时 [1 ], 2 ) + 1 ] 字符 [i + 1 ] = 集合 [左移 (位与 (临时 [1 ], 3 ), 4 ) + 右移 (临时 [2 ], 4 ) + 1 ] 字符 [i + 2 ] = 集合 [左移 (位与 (临时 [2 ], 15 ), 2 ) + 右移 (临时 [3 ], 6 ) + 1 ] 字符 [i + 3 ] = 集合 [位与 (临时 [3 ], 63 ) + 1 ] i = i + 4 变量循环尾 () 如果真 (余数 > 0 ) 长度 = 取字节集长度 (字符 ) 如果 (余数 = 1 )  字符 [长度 - 1 ] = 取代码 (“=”, )  字符 [长度 ] = 取代码 (“=”, )  字符 [长度 ] = 取代码 (“=”, ) 返回 (到文本 (字符))变量名 | 类 型 | 静态 | 数组 | 备 注 | 文本长度 | | | | 整倍数 | | | | 三字节组 | 字节型 | | 3 | 四字节组 | 字节型 | | 4 | 编码值 | | | | X | | | | n | | | | 二进制数据 | 字节集 | | |
编码文本 = 删全部空 (编码文本 )编码文本 = 子文本替换 (编码文本, #换行符, , , , 真)文本长度 = 取文本长度 (编码文本 )整倍数 = 文本长度 \ 4 如果真 (文本长度 % 4 ≠ 0 ) 整倍数 = 整倍数 + 1 计次循环首 (整倍数, X ) 计次循环首 (4, n )  四字节组 [n ] = 取代码 (编码文本, (X - 1 ) × 4 + n )  编码值 = 寻找文本 (“ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/”, 字符 (四字节组 [n ]), , 假)  如果真 (编码值 = -1 )  跳出循环 () 四字节组 [n] = 编码值 - 1 计次循环尾 () 三字节组 [1 ] = 位或 (四字节组 [1 ] × 4, 四字节组 [2 ] ÷ 16 ) 三字节组 [2 ] = 位或 (四字节组 [2 ] × 16, 四字节组 [3 ] ÷ 4 ) 三字节组 [3 ] = 位或 (四字节组 [3 ] × 64, 四字节组 [4 ]) 二进制数据 = 二进制数据 + 到字节集 (三字节组 ) 处理事件 () 计次循环尾 () 如果真 (n < 5 )  n = 5 - n  二进制数据 = 取字节集左边 (二进制数据, 取字节集长度 (二进制数据 ) - n )返回 (二进制数据)
|
评分
-
查看全部评分
|