Commit Graph

205 Commits

Author SHA1 Message Date
Shigeaki Matsumura 85a7bbdf1a add data descriptor for each entries when encrypto 2015-01-08 18:30:32 +09:00
Shigeaki Matsumura bd5a7e4081 fix to file size with encrption 2015-01-07 10:45:01 +09:00
Shigeaki Matsumura 87d1a5a775 added test cases for encryption support 2015-01-06 00:49:16 +09:00
Shigeaki Matsumura fd26052525 fix to encryption bug 2015-01-04 22:49:58 +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
Johnny Shields 23f2ead7ee - Move encryption related files to /lib/zip/crypto/ dir
- NullEncrypter and NullDecrypter should inherit Encrypter and Decrypter respectively
- Add copyright notice to bottom of added files for consistency
2015-01-04 03:37:43 +09:00
Shigeaki Matsumura c70e5836c7 support traditional encryption 2015-01-01 11:09:17 +09:00
lobashov 7498e8a9d3 add warn_invalid_date option 2014-12-01 18:39:29 +03:00
Nikolay Petrachkov 5a4d1ba52a Use tr instead of gsub 2014-10-22 16:37:21 +02:00
Henry Yang a7a11e33bd NTFS Extra Field (0x000a) support 2014-09-11 23:04:23 -07:00
Jason King cf0a5fe386 `Zip.sort_entries` working for zip output 2014-07-24 11:39:37 -07:00
Alexander Simonov d460b81745 Fix #171 2014-07-23 12:59:29 +03:00
Alexander Simonov 2ef328b11b Version bump 2014-07-02 18:17:00 +03:00
Alexander Simonov 2fcdc3a3ea Revert "Return created zip file from Zip::File.open when supplied a block"
This reverts commit e3029d0b10.
2014-07-02 18:15:54 +03:00
Alexander Simonov 2cd56671fc Version bump 2014-07-02 14:11:04 +03:00
Alexander Simonov 62e0a87e49 Merge pull request #166 from layerssss/master
treat empty file as non-exists
2014-07-02 14:07:52 +03:00
Alexander Simonov a989e8c145 Revert "Speed up Deflater sysread speed when number_of_bytes is small and @output_buffer is large"
This reverts commit a800987a52.
2014-07-02 14:05:13 +03:00
Michael Yin fe1d4ade49 treat empty file as non-exists 2014-07-02 12:46:44 +08:00
Alexander Simonov 09011eca6b Merge pull request #141 from zacstewart/master
Add InputStream#ungetc
2014-06-21 17:48:49 +03:00
Tyler Pickett e3029d0b10 Return created zip file from Zip::File.open when supplied a block
This change is to match ruby zip’s behavior to core’s IO.open when
supplied a block.
2014-06-17 10:08:26 -06:00
Alexander Simonov 6b77562d32 Version bump 2014-05-30 20:12:33 +03:00
Mehmet Celik b5c5b6803e Zip::Entry::DEFLATED was forced on every file 2014-04-23 08:42:09 +02:00
mrloop 9eb35ca0c4 Don't send empty string to stream
Unneeded method call removed.
This was causing an issue in rails 4 and zipline
https://github.com/fringd/zipline/pull/10
2014-04-17 13:23:12 +01:00
Alexander Simonov 3ab98483c9 Merge pull request #154 from orien/exception_naming
Alias for legacy error names
2014-04-11 10:03:31 +03:00
Orien Madgwick 9d4292007c alias error names
Ensure we maintain the v1 interface
2014-04-11 08:32:17 +10:00
Alexander Simonov 47ef890de6 Version bump 2014-04-06 18:54:23 +03: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
Ian Young 37ed325783 Clean up tempfiles from output stream, fixes #57 2014-04-04 14:32:11 -07:00
Alexander Simonov 527137db5f Version bump 2014-03-18 15:10:31 +02:00
Alexander Simonov f7949596eb Fix #143 2014-03-18 15:09:50 +02:00
Alexander Simonov 57482232da Version bump 2014-03-16 19:29:15 +02:00
Jeremy Stanley b0b46a5b37 only write zip64 central directory if zip64 support enabled 2014-03-13 10:48:04 -06: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
Zac Stewart 192f910992 Use string concatenation instead of String#prepend
For < Ruby 1.9.3 compatibility
2014-03-12 11:52:12 -04:00
Zac Stewart 96377f72de Add InputStream#ungetc
Works like IO#ungetc
2014-03-11 21:19:24 -04:00
Alexander Simonov 2697c7ea4f Fix #138 2014-03-09 20:38:24 +02:00
Alexander Simonov 34437e77b8 Fix for #125 2014-03-01 12:17:22 +02:00
Alexander Simonov 81c4c4face Fix #135 2014-03-01 00:31:10 +02:00
Alexander Simonov 09ac194540 Merge pull request #130 from srawlins/less-allocations-writing-a-zipfile
Allocate less Arrays and Strings when writing a zip
2014-02-07 09:05:34 +02:00
Sam Rawlins a37e13c6f0 File.exists? -> File.exist? 2014-02-06 15:00:38 -08:00
Henry Yang a800987a52 Speed up Deflater sysread speed when number_of_bytes is small and @output_buffer is large 2014-02-04 10:56:56 -08:00
Sam Rawlins a68a36c759 Allocate less Arrays and Strings when writing a zip 2014-02-03 12:15:08 -08: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
Alexander Simonov 18506c6345 Fix #119 calling 'path' on not IO objects 2014-01-06 20:29:39 +02:00
Jim Ryan 0f8ce2cbb8 Make File.open_buffer support Tempfiles 2013-12-02 18:57:42 -05:00
Alexander Simonov 3917dedbb5 Version bump 2013-11-01 16:36:25 +02:00
Alexander Simonov 94b29aba5d Fix #106 Set options about restoring ownerships, permissions and times. restore permissions enabled by default. 2013-10-27 16:30:48 +02:00