It would be nice to extend same function to proper zip / unzip archival. Wikipedia has published zip archive format specifications. Here is the link.
I did so in our internal project, and don't feel sharing code, but given good description it is accessible practically to any developer.
Note 16 byte data descriptor field, it will come handy if you don't feel like saving buffer(s) prior writing to stream.
It became somewhat important to our team due to third party accepting compressed data. My feeling is sharing code ( to enable consistent decompression ) does not work always. However, writing to common interface documented as standard is nice. Having ability to drop the file to Windows Explorer, double - click on it and see content comes as a bonus
Please do not treat this entry in any shape or form other than personal note.