求助VB解压Gzip代码
Private Sub Winsock1_Connect()
Dim StrCommand As String
StrCommand = StrCommand & "GET /s?bs=%B7%C7%B3%CF%CE%F0%C8%C5&f=8&wd=%B7%C7%B3%CF%CE%F0%
C8%C5 HTTP/1.1" & vbCrLf
StrCommand = StrCommand & "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/msword, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/x-silverlight, application/QVOD, application/QVOD,
*/*" & vbCrLf
StrCommand = StrCommand & "Referer: http://www.baidu.com/" & vbCrLf
StrCommand = StrCommand & "Accept-Language: zh-cn" & vbCrLf
StrCommand = StrCommand & "Accept-Encoding: gzip, deflate" & vbCrLf
StrCommand = StrCommand & "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; QQDownload 1.7; .NET CLR 2.0.50727; CIBA; Alexa Toolbar)" & vbCrLf
StrCommand = StrCommand & "Host: www.baidu.com" & vbCrLf
StrCommand = StrCommand & "Connection: Keep-Alive" & vbCrLf
StrCommand = StrCommand & "Cookie: BAIDUID=E3E01D2A45C64A7EEED5379889E976BF:FG=1" &
vbCrLf & vbCrLf
Winsock1.SendData StrCommand
End Sub
WinSock接收来的Gzip数据解压位正常数据,希望各位大侠帮我解决。
Dim StrCommand As String
StrCommand = StrCommand & "GET /s?bs=%B7%C7%B3%CF%CE%F0%C8%C5&f=8&wd=%B7%C7%B3%CF%CE%F0%
C8%C5 HTTP/1.1" & vbCrLf
StrCommand = StrCommand & "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/msword, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/x-silverlight, application/QVOD, application/QVOD,
*/*" & vbCrLf
StrCommand = StrCommand & "Referer: http://www.baidu.com/" & vbCrLf
StrCommand = StrCommand & "Accept-Language: zh-cn" & vbCrLf
StrCommand = StrCommand & "Accept-Encoding: gzip, deflate" & vbCrLf
StrCommand = StrCommand & "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; QQDownload 1.7; .NET CLR 2.0.50727; CIBA; Alexa Toolbar)" & vbCrLf
StrCommand = StrCommand & "Host: www.baidu.com" & vbCrLf
StrCommand = StrCommand & "Connection: Keep-Alive" & vbCrLf
StrCommand = StrCommand & "Cookie: BAIDUID=E3E01D2A45C64A7EEED5379889E976BF:FG=1" &
vbCrLf & vbCrLf
Winsock1.SendData StrCommand
End Sub
WinSock接收来的Gzip数据解压位正常数据,希望各位大侠帮我解决。
...全文
相关推荐
VB6之借助zlib实现gzip解压缩-附件资源
VB6之借助zlib实现gzip解压缩-附件资源
VB.NET实现的谷歌翻译接口,用HttpWebRequest,自动解压gzip数据流,json解析,运行JScript,EXECL,Word关联操作
VB.NET实现的谷歌翻译接口,使用了HttpWebRequest,可以自动解压gzip数据流(webcilent不方便),以及json解析,运行JScript代码,EXECL,Word关联操作
scan_task.rar_gzip_vb6 HTTP报文_vb6 gzip
vb6程序集,含数据库转电子表格、打印监控、HTTP数据报监控等内容。其中HTTP数据报文实现了gzip格式解压和utf-8字符解码。
VB中实现压缩与解压
为了将文件存放到数据库中占用的空间小,可以将文件用二进制读取后进行压缩再存到数据库中。
VB.NET编写的压缩与解压函数
用VB.NET编写的压缩与解压函数,此函数可对保存成二进制数据的WORD文档内容进行很大的压缩,使系统读取大容量数据的速度大大地加快。


API
