Easy way that compress files in ruby is using zip lib.
Zip::File.open('./compress.zip', create: true) do |zip|
zip.get_output_stream("./stuff_to_ziped.pdf") do |f|
f.puts File.read("./stuff_to_zip.pdf")
end
Easy way that compress files in ruby is using zip lib. Zip::File.open('./compress.zip', create:...
Easy way that compress files in ruby is using zip lib.
Zip::File.open('./compress.zip', create: true) do |zip|
zip.get_output_stream("./stuff_to_ziped.pdf") do |f|
f.puts File.read("./stuff_to_zip.pdf")
end

Working with files in Linux isn't just about creating and editing them. Sometimes you need...

The Complete Guide to File Compression: PDF, Image, Video & Document Compression...

Turning several browser files into one download usually leads to a backend endpoint: upload the...

Per comprimere e spacchettare i file in modo veloce e semplice, scopri come scaricare (e usare) 7-Zip

PDFs have a tendency to balloon in size. A resume with a few high-res images easily hits 20MB. A...

Suppose you have a directory full of text documents. Most are repetitive, padded with boilerplate,...