- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
字符串压缩算法(String compression algorithm)
字符串压缩算法(String compression algorithm)
String compression algorithm
I recently worked out a compression algorithm for strings, although there were some drawbacks. If the number of letters in the string is too high, the compression efficiency will be greatly reduced. This algorithm is designed primarily for compressing digital designs.
Now share the source code, and I hope everyone will make more comments.
Using System;
Namespace New919.Encrypt
{
/ / / summary
Improved algorithm of / / / before, using four digit string interception compression
/ / / /summary
Public class CompressStr
{
/ / 64 hexadecimal dictionary
Private static, 2, 3, 4, 5, 6, 8, 9, A, C, D, E, F, G, I, J, K, L, H, M, strNumber, N, B,, O, string[],, P,, Q,, R, S, T,
U, W, X, V, Y, Z, a, B, C, e, F, g, H, I, J, K, L, m, n, O, P, Q, R, d, s, Z, Y, t, X, W, U, V, , , , , , , , , , , , , , , , , , , , ,
-, /, (, )};
Private, static, string, strStringInString =;
Private, static, string, strNumberInString =;
#region compression method
#endregion
#region conversion to 64 hexadecimal method
Public, static, string, Compress (string, p_string)
{
/ / try
{/ /
Char[] charArrFirst = Separate (p_string).ToCharArray ();
#region first interception
String strConnectFirst =;
String strConnectSecond =;
String strConnectThird =;
String strConnectFourth =;
For (int i = charArrFirst.Length - 1; I -1; I -)
{
Int intTemp = (int) charArrFirst[i];
If (strConnectFirst.Length = 16)
{
/ / greater than 16 out of the loop
Break;
}
Else
{
/ / if (intTemp = 48 intTemp = 57)
{/ /
StrConnectFirst = Convert.ToString (charArrFirst[i]) + strConnectFirst;
} / /
/ / else
{/ /
/ / break;
} / /
}
}
After the first take / digit string, the entire string left part
String strAfterFirst = p_string.Substring (0, p_string.Length - strConnectFirst.Length);
The first successful interception / finished, digital and letters section separation
#endregion
#region second interception, in the first interception on the basis of the strAfterFirst stri
您可能关注的文档
- 填空民法1(Fill in the blanks 1).doc
- 墙纸的简介及类型(Wallpaper profiles and types).doc
- 填空 6(Fill in the blanks 6).doc
- 增加员工安全感,提升员工忠诚度(Increase employee's sense of security and enhance employee loyalty).doc
- 增强体力食物集锦(Augmented physical food collection).doc
- 增强记忆力十法(Ten methods of increasing memory).doc
- 增肌过程中的饮食误区(Dietary disorder in the course of muscle expansion).doc
- 增肥秘诀(Fattening tips).doc
- 增胖的生活守则及饮食守则(A fat lifestyle and diet code).doc
- 增资扩股(Increase their investment).doc
- 字谜大全(Crossword puzzles).doc
- 孙子兵法与造势(Sun Tzu's art of war and propaganda).doc
- 孙玉亭压码英语(Sun Yuting code English).doc
- 孙老师 心灵鸡汤(Sun heart chicken soup).doc
- 孝庄秘史(Sourdrang secret).doc
- 孝文化(Filial piety culture).doc
- 孕期内的运动、饮食及环境(Exercise, diet and environment during pregnancy).doc
- 孟郊 孟郊集 卷05 咏怀上(Meng Jiao Meng Jiao set volume 05 on yonghuai).doc
- 孟郊 孟郊集 卷06 咏怀下(Meng Jiao Meng Jiao collection volume 06 yonghuai under).doc
- 学习c语言的全过程 浅谈c语言学习方法(The whole process of learning C language -- a brief talk about C language learning methods).doc
文档评论(0)