adm-zip icon indicating copy to clipboard operation
adm-zip copied to clipboard

Zip A Variable

Open TheRealTR opened this issue 2 years ago • 2 comments

Maybe this has been addressed, but I cannot find a clear answer: is it possible to create a zip file from a variable, such as a string?

TheRealTR avatar Jan 31 '23 07:01 TheRealTR

yes

zip.addFile("test.txt", Buffer.from(content, "utf8"), "entry comment goes here");

cthackers avatar Jan 31 '23 09:01 cthackers

Thank you!

On Jan 30, 2023, at 11:24 PM, The Brain @.***> wrote:

yes

zip.addFile("test.txt", Buffer.from(content, "utf8"), "entry comment goes here");

— Reply to this email directly, view it on GitHub https://github.com/cthackers/adm-zip/issues/443#issuecomment-1410026060, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXVARKGNPK5DUFLDM2FAFETWVDK4PANCNFSM6AAAAAAUMCQ45I. You are receiving this because you authored the thread.

TheRealTR avatar Jan 31 '23 11:01 TheRealTR