说明在linux中压缩的文件用winrar可以正常解压缩
但是使用winrar里面的unrar.exe 的命令行方法无法解压,提示“不是RAR压缩包”,将文件后缀改名为.rar也不行
使用unrar.dll 也无法解压缩
使用zip.dll中的解压缩方法也解不出。
windowsxp中有自带的gzip.dll,但是在网上只找到了解压缩字符的方法,不知道如何将该方法转换为加压缩文件
http://blog.csdn.net/hack8/archive/2009/11/07/4783444.aspx
下载.gz文件
http://61.dc.ftn.qq.com/ftn_handler/4c3213950a531312158e4a74a647f0edea54d6e62d61ecea5783afb2833ab968b8343474efe31a5603480bd75109f5412ac392e320acb895c3ab4408cfe07417/test.sum.gz?k=2365623854999b9afa12fe774265564a0104035a5c0356074e5d5a5b0548505700034f5906075c485a5d075d07505255545c0308646e6411061616161710094b041f6205&fr=00&&txf_fid=aa8688a0218f4d993167e2e04e115bbe029bc971
提取码 ceb8dede
哪位帮我看下,谢谢了
2 个解决方案
#1
Option Explicit
Sub Main()
Dim hFile As Integer
Dim aBytes() As Byte
hFile = FreeFile()
Open App.Path & "\test.sum.gz" For Binary Access Read As #hFile
ReDim aBytes(LOF(hFile) - 1)
Get #hFile, , aBytes
Close #hFile
UnCompressByte aBytes
hFile = FreeFile()
Open App.Path & "\output.dat" For Binary Access Write As #hFile
Put #hFile, , aBytes
Close #hFile
End Sub
#2
非常感谢,代码可以哈
#1
Option Explicit
Sub Main()
Dim hFile As Integer
Dim aBytes() As Byte
hFile = FreeFile()
Open App.Path & "\test.sum.gz" For Binary Access Read As #hFile
ReDim aBytes(LOF(hFile) - 1)
Get #hFile, , aBytes
Close #hFile
UnCompressByte aBytes
hFile = FreeFile()
Open App.Path & "\output.dat" For Binary Access Write As #hFile
Put #hFile, , aBytes
Close #hFile
End Sub
#2
非常感谢,代码可以哈