I'm using Python. I can create a gzip file of course but there is some trickery involved to hash the content in a stable way and ensure that the resource is not recreated (causing a cascade of resource updates) unless something in the folder actually changes.