On my system I have two different environment. First one is PHP-based and second is Rails5/Ruby2.4.0.
Let's say I have few files and when request made, I put those files in a ZIP file and then post to user. Files can be changed so, zip-before process is not an option.
I can use PHP library called ZipStream. This package allow me to directly zip the file and post to user browser without loading all files into memory and without creating temp files. I can easily handle GBs
of files.
But the problem is, I cannot find anything for Rails/Ruby
. All I can find is always do memory first then post to user. But i cannot load all files to memory.
Is there any way to achive this on Rails/Ruby just like on PHP does?
Anyone knows any library/project or a way to do it?