=>结果
=>源码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SevenZip; // 记得添加SevenZipSharp.dll引用;
using System.IO;
namespace XmlRpcWebClient
{
public partial class Form_SevenZipSharp : Form
{
public Form_SevenZipSharp()
{
InitializeComponent();
}
// 压缩库路径<7z.dll不能添加引用>
private readonly string sevenzUrl = Application.StartupPath + @"\7z.dll";
// 压缩后的字节数组
byte[] data;
private void Form_SevenZipSharp_Load(object sender, EventArgs e)
{
// 原始字符串<要压缩的字串>
const string instr = "