Vba解压GZIP流,网页数据下载的 “WinHttp” 方法

本文介绍了如何在VBA中利用WinHttp组件处理GZIP压缩的网页数据,通过引入gzip.dll文件,实现数据的解压和下载。提供了一个下载gzip.dll的链接,并给出了模块代码示例。
摘要由CSDN通过智能技术生成

需要“gzip.dll”文件,下载地址: http://pan.baidu.com/s/1ta939

 

模块代码:

 

Public Const OFFSET As Long = &H8
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)
Public Declare Function InitDecompression Lib "gzip.dll" () As Long
Public Declare Function CreateDecompression Lib "gzip.dll" (ByRef context As Long, ByVal Flags As Long) As Long
Public Declare Function DestroyDecompression Lib "gzip.dll" (ByRef context As Long) As Long
Public Declare Function Decompress Lib "gzip.dll" (ByVal context As Long, inBytes As Any, ByVal input_size As Long, outBytes As Any, ByVal output_size As Long, ByRef input_used As Long, ByRef output_used As Long) As Long
Public Declare Function MultiByteToWideChar Lib
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值