Skip to content

uzlib移植到Arduino,解压gzip

Notifications You must be signed in to change notification settings

gsh1209/ArduinoUZlib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino uzlib库,用于解压gzip流

用法:

size_t size = stream->available(); // 还剩下多少数据没有读完?
uint8_t inbuff[size]; // 准备一个数组来装流数据,有多少装多少
stream->readBytes(inbuff, size); // 将http流数据写入inbuff中
uint8_t *outbuf=NULL; //解压后的输出流
uint32_t outsize=0; // 解压后多大?在调用解压方法后会被赋值。
// 调用解压函数
int result=ArduinoUZlib::decompress(inbuff, size, outbuf,outsize);
// 输出解密后的数据到控制台。
Serial.write(outbuf,outsize);

可以看看example里面的示例

参考

  1. https://github.com/pfalcon/uzlib

About

uzlib移植到Arduino,解压gzip

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 66.5%
  • Assembly 18.7%
  • C++ 12.3%
  • Other 2.5%