Commit Graph

22 Commits

Author SHA1 Message Date
Pavel Lobashov c0177a455b Merge branch 'master' into rubocop_fixes
Conflicts:
	README.md
	samples/example_recursive.rb
2015-06-08 10:14:25 +03:00
Vít Ondruch 32016ab1bf Remove executable bit. 2015-03-31 13:15:46 +02:00
Pavel Lobashov fd864bd7ab fix rubocop Style/CaseEquality cop 2015-03-24 19:44:47 +03:00
Pavel.Lobashov cb143f0cff fix rubocop Style/SpaceAroundEqualsInParameterDefault cop 2015-03-22 19:45:26 +03:00
Pavel.Lobashov 73e5f70bdf fix rubocop Style/SpaceAfterMethodName cop 2015-03-22 19:43:44 +03:00
Pavel Lobashov b93ef1266f fix rubocop Style/StringLiterals cop 2015-03-21 11:27:44 +03:00
Pavel Lobashov b9a757e045 fix rubocop Style/EmptyLinesAroundClassBody cop 2015-03-21 11:21:26 +03:00
Alexander Simonov 721c1f05ed Merge pull request #201 from mcantor/master
Be smarter about handling buffer file modes
2015-01-17 12:21:32 +02:00
Shigeaki Matsumura 85a7bbdf1a add data descriptor for each entries when encrypto 2015-01-08 18:30:32 +09:00
Johnny Shields c2ecafe770 Change method interfaces to allow encrypter/decrypter to be passed into stream methods 2015-01-04 04:07:51 +09:00
Shigeaki Matsumura c70e5836c7 support traditional encryption 2015-01-01 11:09:17 +09:00
Max Cantor 7c7d786f02 Be smarter about handling buffer file modes. 2014-12-17 16:16:02 -05:00
Orien Madgwick 34f5025d76 default arg for write_buffer
Adding the io parameter to OutputStream::write_buffer breaks backward
compatibility with v1.1.0. Adding a default value reinstates backward
compatibility.
2014-04-06 23:45:19 +10:00
Jeremy Stanley 9e144061b9 fix modifying existing zipfile with zip64 enabled
The local header size computed from the central directory entry
is incorrect due to the Zip64Placeholder in the local entry.
This caused us to seek to the wrong location when copying an
unchanged compressed data stream.

(The same problem could occur when modifying any zip file where
the local header and central directory header contain different
variable-sized fields, so it's a good idea not to trust the CD
to tell us the local header size in any case.)
2014-03-12 15:57:52 -06:00
Alexander Simonov 81c4c4face Fix #135 2014-03-01 00:31:10 +02:00
Alexander Simonov ec81c30382 Fix for #126 and #127 2014-01-24 11:37:38 +02:00
René Sprotte 471aa1599e Add config to set the default compression level. 2014-01-20 14:38:22 +01:00
Alexander Simonov 52efd5cd61 Fix tests. Fix duping StringIO for writing 2014-01-19 14:06:54 +02:00
Alexander Simonov c7f0b17abf Real fix for #119 2014-01-19 13:45:58 +02:00
Jeremy Stanley af165f5cbd Add read/write support for zip64 extensions
This commit adds the capability of creating archives larger than
4GB via zip64 extensions. It also fixes bugs reading archives of
this size (specifically, the 64-bit offset of the local file
header was not being read from the central directory entry).

To maximize compatibility, zip64 extensions are used only when
required. Unfortunately, at the time we write a local file header,
we don't know the size of the file and thus whether a Zip64
Extended Information Extra Field will be required. Therefore
this commit writes a 'placeholder' extra field to reserve space
for the zip64 entry, which will be written if necessary when
we update the local entry with the final sizes and CRC. I use
the signature "\x99\x99" for this field, following the example
of DotNetZip which does the same.

This commit also adds a rake task, zip64_full_test, which
fully tests zip64 by actually creating and verifying a 4GB zip
file. Please note, however, that this test requires UnZip
version 6.00 or newer, which may not be supplied by your OS.
This test doesn't run along with the main unit tests because
it takes a few minutes to complete.
2013-09-27 20:41:00 -06:00
Alexander Simonov 73d9e1c8a0 StingIO support #47 #18 2013-08-29 23:50:12 +03:00
Alexander Simonov 61ce5dbc5f Refactoring part #2
Rubyzip interface was changed!
2013-06-03 10:56:24 +03:00