lib/zipper.rb
def compress(entries)
            puts "\nadding the following entries into zip package"
            puts "#{ entries.map{ |x| x.name }.join("\n")}"
            buffer = Zip::File.add_buffer do |zio|
                entries.each do |file|
                    if file.is_a? FileEntry
                        zio.add(file.path == nil ? file.name : file.path, file.name)
                    else
                        zio.get_output_stream(file.name) { |os| os.write file.buffer.string }
                    end
                end
            end
        end
def compress(entries)
            puts "\nadding the following entries into zip package"
            puts "#{ entries.map{ |x| x.name }.join("\n")}"
            buffer = Zip::File.add_buffer do |zio|
                entries.each do |file|
                    if file.is_a? FileEntry
                        zio.add(file.path == nil ? file.name : file.path, file.name)
                    else
                        zio.get_output_stream(file.name) { |os| os.write file.buffer.string }
                    end
                end
            end
        end
Creates zip file in memory from passed +FileEntry+ array, returns StringIO as result
 Params:
 +entries+:: array of +FileEntry+ and +ZipEntry+ objects