From d64ce278f01cafc1c3c23aec9bb2394412ad160b Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Thu, 11 Aug 2016 00:30:34 -0400 Subject: update documentation --- Zip.html | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'Zip.html') diff --git a/Zip.html b/Zip.html index b28c867..ca16367 100644 --- a/Zip.html +++ b/Zip.html @@ -85,8 +85,28 @@ -
  • - WriterEntry +
  • + Writers + + +
  • @@ -124,7 +144,7 @@ mem_io = MemoryIO. # read from "foo.zip" Zip.read("foo.zip") do |zip| # read contents of "bar.txt" in "foo.zip" into mem_io - zip["bar.txt"].read(mem_io) + zip["bar.txt"].write(mem_io) end

    Writing to a zip file:

    @@ -260,7 +280,7 @@ io = MemoryIO.new< # extract "bar.txt" from zip archive in Slice some_slice and # save it to MemoryIO Zip.read(some_slice) do |zip| - zip["bar.txt"].read(io) + zip["bar.txt"].write(io) end
    @@ -286,7 +306,7 @@ io = MemoryIO.new< # extract "bar.txt" from "foo.zip" and save it to MemoryIO Zip.read("foo.zip") do |zip| - zip["bar.txt"].read(io) + zip["bar.txt"].write(io) end
    @@ -313,7 +333,7 @@ io = MemoryIO.new< # read "bar.txt" from "foo.zip" Zip.read(File.open("foo.zip", "rb")) do |zip| - zip["bar.txt"].read(io) + zip["bar.txt"].write(io) end
    -- cgit v1.2.3