markbates / pkger

Embed static files in Go binaries (replacement for gobuffalo/packr)
MIT License
1.19k stars 60 forks source link

[Question] Use compression? #138

Closed gkze closed 2 years ago

gkze commented 3 years ago

Apologies if this has already been answered / doesn't make sense.

Is it possible / does it make sense to use this package in conjunction with a compression library? For example, if I have a static website/single-page app that I'd like to embed into a binary, does it make sense to compress it first, and then embed it to be decompressed and served at runtime later? Are there any drawbacks to this approach (aside from possibly more memory usage due to having a decompressed copy of data to serve out alongside its compressed counterpart)?

amir20 commented 3 years ago

I'd be interested for this too. packr has support for gzip. So I would like to see it in this lib before using it.