C#语言写了一个压缩程序,尝试了几种方式的压缩
1.winrar命令行压缩
2..net GzipStream压缩
3.IGzipCSharp组件压缩但是问题是压缩后的文件在linux系统里不能正确解压,linux系统的解压方式为gzip命令解压。我不能改变linux的解压方式,那我应该怎么修改我的程序,怎么实现windows和linux兼容的解压缩
linuxwindowsc#
1.winrar命令行压缩
2..net GzipStream压缩
3.IGzipCSharp组件压缩但是问题是压缩后的文件在linux系统里不能正确解压,linux系统的解压方式为gzip命令解压。我不能改变linux的解压方式,那我应该怎么修改我的程序,怎么实现windows和linux兼容的解压缩
linuxwindowsc#
解决方案 »
- c#中如何读取串口中的数据
- 这个问题是签名文件不匹配,还是什么,如何解决呢
- DataGrid问题
- 大虾救命,如何把一个从数据库提取出来的Object转换成为byte[].分不够再加
- 静态非托管引用DLL 卸载 删除
- "[SerializableAttribute]"的语法怎么是这样一个表示法???
- 【新手求教】System.InvalidOperationException: 阅读器关闭时尝试调用 Read 无效
- 菜鸟的烦恼(请各位高手多多帮忙呀!)
- 请问如何在c#中判断日期是否正确?
- 求教无字段问题
- member = member = new Member(UserRole.Member);
- C#webBroswer怎么发送get与post包并打开最终界面
想压缩多个文件可以看下这个
http://www.codeproject.com/Tips/319438/How-to-Compress-Decompress-directories
gzip -d a.z
gzip -d b.gz
cat a
cat b
{
byte[] bytes = Encoding.Default.GetBytes("123");
stream.Write(bytes, 0, bytes.Length);
}
gzip -d test.gz
cat test
====
123我这边没问题啊
gzip -V
====
gzip 1.3.5
(2002-09-30)
Copyright 2002 Free Software Foundation
Copyright 1992-1993 Jean-loup Gailly
This program comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Compilation options:
DIRENT UTIME STDC_HEADERS HAVE_UNISTD_H HAVE_MEMORY_H HAVE_STRING_H HAVE_LSTAT
Written by Jean-loup Gailly.