zip magic header: 120, 218
ZipStreamExtensions
01 Syntax
Microsoft.VisualBasic.Net.Http.ZipStreamExtensions
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| TestZipMagic | 1 | test the zip magic header |
| Zip | 1 | zip stream compression |
| UnZipStream | 1 | 进行zlib数据流的zip解压缩 > https://bbs.csdn.net/topics/392275364 |
| Deflate | 1 | Decompress. 在这里应该是正确的跳过了deflate压缩算法标识字节的数据流 |
03 Members
TestZipMagic(Byte())
test the zip magic header
Parameters
| Name | Type | Description |
|---|---|---|
buffer | Byte() | - |
Zip(
Stream, Boolean)zip stream compression
Remarks
this function will add the zlib magic header when magicHeader is set to true. [NOTE: the zlib compression result via the .NET library did not contains the zlib magic header.]
Parameters
| Name | Type | Description |
|---|---|---|
stream | Stream | - |
UnZipStream(
IEnumerable(Of Byte), Boolean)进行zlib数据流的zip解压缩
Remarks
2018-11-15 经过测试,没有bug,与zlibnet的测试结果一致
Parameters
| Name | Type | Description |
|---|---|---|
stream | IEnumerable(Of Byte) | - |
noMagic | Boolean | does the given stream data not contains the ziplib magic header? default parameter value false means not contains, then the given stream data will be deflate directly. otherwise this function will try to populate out two bytes(zlib magic header) and then make stream data decompression if the parameter value is TRUE. |
Deflate(
Stream)Decompress. 在这里应该是正确的跳过了deflate压缩算法标识字节的数据流