202021 Nov
Parsing GZip Stream Without Looking Back
Type
General News
Companies
Source
Medo64
Summary

Some files can exist in two equivalent forms – compressed and uncompressed. To open a compressed file in C#, you could pass it to GZipStream – it works flawlessly. However, you just consumed 2 bytes and simply handing over file stream to GZipStream will no longer work. For and many more transparently compressed formats, you can simply decide to skip into bread-and-butter of encryption – deflate algorithm. If you move just additional 8 bytes (thus skipping a total of 10), you can use DeflateStream and forget about “rewinding.” Wanna see example?

Classifications
  • Virtualization & Network Resources
  • Networking
  • Medical Equipment Software
  • Healthcare
  • Web and Content Management
  • Health Insurance Software
  • Insurance
  • Data Warehousing Software
  • Data Management